Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael Istria2016-03-10 09:06:46 +0000
committerMickael Istria2016-03-24 18:50:40 +0000
commit8c50a147d336c900c2103fffdb3c485f286d45ba (patch)
tree10290202cc391a5d61e8cb0ecda3b78b3eec5677 /bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java
parentc0b5d56b195d220b4b22d172e1ac3b608a164234 (diff)
downloadrt.equinox.bundles-8c50a147d336c900c2103fffdb3c485f286d45ba.tar.gz
rt.equinox.bundles-8c50a147d336c900c2103fffdb3c485f286d45ba.tar.xz
rt.equinox.bundles-8c50a147d336c900c2103fffdb3c485f286d45ba.zip
Bug 489330 - Technical debt : Number instantiations
Save resources by using the Number factories (valueOf) rather than creating new instances. Change-Id: I285439a41bb102a88d893527f23366444ccafdbe Signed-off-by: Mickael Istria <mistria@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java')
-rw-r--r--bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java
index 93c2e75a5..127de74e3 100644
--- a/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java
+++ b/bundles/org.eclipse.equinox.metatype/src/org/eclipse/equinox/metatype/impl/MetaTypeServiceImpl.java
@@ -58,7 +58,7 @@ public class MetaTypeServiceImpl implements EquinoxMetaTypeService, SynchronousB
// Avoid synthetic accessor method warnings.
final LogService loggerTemp = this.logger;
final ServiceTracker<Object, Object> tracker = this.metaTypeProviderTracker;
- Long bID = new Long(b.getBundleId());
+ Long bID = Long.valueOf(b.getBundleId());
synchronized (_mtps) {
if (_mtps.containsKey(bID))
return _mtps.get(bID);
@@ -116,7 +116,7 @@ public class MetaTypeServiceImpl implements EquinoxMetaTypeService, SynchronousB
public void bundleChanged(BundleEvent event) {
int type = event.getType();
- Long bID = new Long(event.getBundle().getBundleId());
+ Long bID = Long.valueOf(event.getBundle().getBundleId());
switch (type) {
case BundleEvent.UPDATED :

Back to the top