Author: clement
Date: Tue May 13 11:25:24 2008
New Revision: 655961
URL: http://svn.apache.org/viewvc?rev=655961&view=rev
Log:
Improve error messages when the bundle context lookup failed (issue #Felix-555).
Modified:
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java
Modified:
felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java
URL:
http://svn.apache.org/viewvc/felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java?rev=655961&r1=655960&r2=655961&view=diff
==============================================================================
--- felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java
(original)
+++ felix/trunk/ipojo/core/src/main/java/org/apache/felix/ipojo/Extender.java
Tue May 13 11:25:24 2008
@@ -443,7 +443,7 @@
// getBundleContext (OSGi 4.1)
Method meth = null;
try {
- meth = bundle.getClass().getMethod("getBundleContext", new
Class[0]);
+ meth = bundle.getClass().getMethod("getBundleContext", new
Class[0]); // This method is public and is specified in the Bundle interface.
} catch (SecurityException e) {
// Nothing do to, will try the Equinox method
} catch (NoSuchMethodException e) {
@@ -490,10 +490,10 @@
try {
return (BundleContext) fields[i].get(bundle);
} catch (IllegalArgumentException e) {
- m_logger.log(Logger.ERROR, "Cannot get the BundleContext
by invoking " + meth.getName(), e);
+ m_logger.log(Logger.ERROR, "Cannot get the BundleContext
by invoking " + fields[i].getName(), e);
return null;
} catch (IllegalAccessException e) {
- m_logger.log(Logger.ERROR, "Cannot get the BundleContext
by invoking " + meth.getName(), e);
+ m_logger.log(Logger.ERROR, "Cannot get the BundleContext
by invoking " + fields[i].getName(), e);
return null;
}
}