Author: alesj
Date: 2009-12-07 08:07:39 -0500 (Mon, 07 Dec 2009)
New Revision: 97505
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
Log:
Move manager usage outside loop.
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-07
13:06:23 UTC (rev 97504)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-07
13:07:39 UTC (rev 97505)
@@ -313,10 +313,11 @@
if (contexts.isEmpty())
return null;
+ OSGiBundleManager manager = getBundleManager();
Set<ServiceReference> result = new HashSet<ServiceReference>();
for (ControllerContext context : contexts)
{
- ServiceReference ref =
getBundleManager().getServiceReferenceForContext(context);
+ ServiceReference ref = manager.getServiceReferenceForContext(context);
if (ref != null)
result.add(ref);
}