Author: thomas.diesler(a)jboss.com
Date: 2010-02-05 01:31:40 -0500 (Fri, 05 Feb 2010)
New Revision: 100454
Modified:
projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteBundle.java
Log:
More rebust RemoteBundle.getState()
Modified:
projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteBundle.java
===================================================================
---
projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteBundle.java 2010-02-05
06:21:55 UTC (rev 100453)
+++
projects/jboss-osgi/projects/bundles/husky/trunk/src/main/java/org/jboss/osgi/testing/internal/RemoteBundle.java 2010-02-05
06:31:40 UTC (rev 100454)
@@ -101,26 +101,25 @@
if (uninstalled == true)
return Bundle.UNINSTALLED;
- boolean isRegistered;
try
{
MBeanServerConnection server = getRuntime().getMBeanServer();
- isRegistered = server.isRegistered(objectName);
+ if (server.isRegistered(objectName))
+ {
+ return bundle.getState();
+ }
}
catch (RuntimeException rte)
{
Throwable cause = rte.getCause() != null ? rte.getCause() : null;
if (cause instanceof InstanceNotFoundException == false)
log.warn("Cannot get state for: " + objectName, cause);
-
- isRegistered = false;
}
catch (IOException ex)
{
log.warn("Cannot get state for: " + objectName, ex);
- isRegistered = false;
}
- return isRegistered ? bundle.getState() : Bundle.UNINSTALLED;
+ return Bundle.UNINSTALLED;
}
@Override
Show replies by date