aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2011-03-23 11:59:56 (EDT)
committerGlyn Normington2011-03-23 11:59:56 (EDT)
commitca2891b974b4c90bd3e0dff7ec5bada0444d7e25 (patch)
treef62bec9c8b0f61707ce7e0ab507e7016f458f4fb
parent2d5214e1ca50e27ea3453b78785aeae321fe1f69 (diff)
downloadorg.eclipse.virgo.kernel-ca2891b974b4c90bd3e0dff7ec5bada0444d7e25.zip
org.eclipse.virgo.kernel-ca2891b974b4c90bd3e0dff7ec5bada0444d7e25.tar.gz
org.eclipse.virgo.kernel-ca2891b974b4c90bd3e0dff7ec5bada0444d7e25.tar.bz2
Use light weight Collection for holding one value.
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/hook/RegionBundleEventHook.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/hook/RegionBundleEventHook.java b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/hook/RegionBundleEventHook.java
index 57ff416..e4380ba 100644
--- a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/hook/RegionBundleEventHook.java
+++ b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/hook/RegionBundleEventHook.java
@@ -13,10 +13,9 @@
package org.eclipse.virgo.kernel.osgi.region.hook;
+import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashSet;
import java.util.Iterator;
-import java.util.Set;
import org.eclipse.virgo.kernel.core.FatalKernelException;
import org.eclipse.virgo.kernel.osgi.region.Region;
@@ -74,7 +73,7 @@ public final class RegionBundleEventHook implements EventHook {
}
private boolean find(BundleContext finderBundleContext, Bundle candidateBundle) {
- Set<Bundle> candidates = new HashSet<Bundle>();
+ Collection<Bundle> candidates = new ArrayList<Bundle>(1);
candidates.add(candidateBundle);
this.bundleFindHook.find(finderBundleContext, candidates);
return !candidates.isEmpty();