[jboss-cvs] JBossAS SVN: r94596 - projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/internal.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Oct 9 09:06:11 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-09 09:06:11 -0400 (Fri, 09 Oct 2009)
New Revision: 94596
Modified:
projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/internal/AbstractConnector.java
Log:
Optimize listener lookup code a little
Modified: projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/internal/AbstractConnector.java
===================================================================
--- projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/internal/AbstractConnector.java 2009-10-09 12:48:58 UTC (rev 94595)
+++ projects/jboss-osgi/projects/bundles/husky/trunk/harness/src/main/java/org/jboss/osgi/husky/internal/AbstractConnector.java 2009-10-09 13:06:11 UTC (rev 94596)
@@ -80,21 +80,25 @@
{
synchronized (listeners)
{
- try
+ for (PackageListener aux : listeners)
{
- for (PackageListener aux : listeners)
+ if (aux.match(req))
{
- if (aux.match(req))
- {
- listener = aux;
- break;
- }
+ listener = aux;
+ break;
}
- listeners.wait(200);
}
- catch (InterruptedException e)
+
+ if (listener == null)
{
- // ignore
+ try
+ {
+ listeners.wait(200);
+ }
+ catch (InterruptedException e)
+ {
+ // ignore
+ }
}
}
}
More information about the jboss-cvs-commits
mailing list