Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blewitt2015-09-07 18:44:26 +0000
committerAlex Blewitt2015-09-11 07:51:36 +0000
commit2fe3fff966fde4cedc73ca8c1df13b2fd4d605a7 (patch)
treecd5c19a1363e899af66de1bdce90920ae5fd32ce /org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java
parent368177ac20c448cd2e6d7d5f2d983c9734b14a49 (diff)
downloadeclipse.platform.debug-2fe3fff966fde4cedc73ca8c1df13b2fd4d605a7.tar.gz
eclipse.platform.debug-2fe3fff966fde4cedc73ca8c1df13b2fd4d605a7.tar.xz
eclipse.platform.debug-2fe3fff966fde4cedc73ca8c1df13b2fd4d605a7.zip
Bug 476814 - Replace new Integer() with Integer.valueOf()
Using Integer.valueOf() instead of new Integer() allows for the runtime to cache commonly instantiated values; typically, this will be for values in the range -128..127. Using valueOf is preferred for this reason. Change-Id: I1022eb4973b760b830ace5d39b76eea9353d4ca2 Signed-off-by: Alex Blewitt <alex.blewitt@gmail.com>
Diffstat (limited to 'org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java
index 0a683b12e..7a6d99a72 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/LaunchConfigurationComparator.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2013 IBM Corporation and others.
+ * Copyright (c) 2007, 2015 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -75,7 +75,7 @@ public class LaunchConfigurationComparator extends WorkbenchViewerComparator {
Iterator<ILaunchConfigurationType> iterator = types.iterator();
int i = 0;
while (iterator.hasNext()) {
- fgCategories.put(iterator.next(), new Integer(i));
+ fgCategories.put(iterator.next(), Integer.valueOf(i));
i++;
}
}

Back to the top