Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2011-01-31 23:10:12 +0000
committerMatthias Sohn2011-01-31 23:10:12 +0000
commit6ab22105fe2058dc566252cc44788bc37595aac8 (patch)
tree9699814dab8642c2e1404c0162a63d0e166b0f54
parentc2a586edee9a853ac00d1cb4079d810bf5bcbb5d (diff)
downloadegit-6ab22105fe2058dc566252cc44788bc37595aac8.tar.gz
egit-6ab22105fe2058dc566252cc44788bc37595aac8.tar.xz
egit-6ab22105fe2058dc566252cc44788bc37595aac8.zip
[findbugs] Silence warning on slow Long(long) constructor
This change won't really affect performance as timestamp or file length are unlikely to be in the cached range -128,127. Change-Id: I9ac0051b3f3b8873c40109e6f0174245e382ef9c Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
-rw-r--r--org.eclipse.egit.core/src/org/eclipse/egit/core/ContainerTreeIterator.java2
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java4
2 files changed, 3 insertions, 3 deletions
diff --git a/org.eclipse.egit.core/src/org/eclipse/egit/core/ContainerTreeIterator.java b/org.eclipse.egit.core/src/org/eclipse/egit/core/ContainerTreeIterator.java
index 2e348f75c9..87510ae73f 100644
--- a/org.eclipse.egit.core/src/org/eclipse/egit/core/ContainerTreeIterator.java
+++ b/org.eclipse.egit.core/src/org/eclipse/egit/core/ContainerTreeIterator.java
@@ -246,7 +246,7 @@ public class ContainerTreeIterator extends WorkingTreeIterator {
} else {
length = asFile().length();
try {
- rsrc.setSessionProperty(FILE_LENGTH_KEY, new Long(
+ rsrc.setSessionProperty(FILE_LENGTH_KEY, Long.valueOf(
length));
} catch (CoreException e) {
// Ignore
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java
index 9ddc7e7b00..3ae2e35b92 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/decorators/GitLightweightDecorator.java
@@ -264,7 +264,7 @@ public class GitLightweightDecorator extends LabelProvider implements
decoratableResource);
// Set (new) 'refreshed' timestamp
resource.setSessionProperty(REFRESHED_KEY,
- new Long(System.currentTimeMillis()));
+ Long.valueOf(System.currentTimeMillis()));
} catch (IOException e) {
handleException(resource, new CoreException(new Status(
IStatus.ERROR, Activator.getPluginId(), e.getMessage(), e)));
@@ -756,7 +756,7 @@ public class GitLightweightDecorator extends LabelProvider implements
try {
// Set (new) 'refresh' timestamp
root.setSessionProperty(REFRESH_KEY,
- new Long(System.currentTimeMillis()));
+ Long.valueOf(System.currentTimeMillis()));
} catch (CoreException e) {
handleException(root, e);
}

Back to the top