felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pde...@apache.org
Subject svn commit: r1772584 - /felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java
Date Sun, 04 Dec 2016 23:28:03 GMT
Author: pderop
Date: Sun Dec  4 23:28:02 2016
New Revision: 1772584

URL: http://svn.apache.org/viewvc?rev=1772584&view=rev
Log:
FELIX-5436: do not log 'callback not found' in case the method invocation throws an invocation
target exception.
(slightly modified the patch suggested by Jeroen, thank you).

Modified:
    felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java

Modified: felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java
URL: http://svn.apache.org/viewvc/felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java?rev=1772584&r1=1772583&r2=1772584&view=diff
==============================================================================
--- felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java
(original)
+++ felix/trunk/dependencymanager/org.apache.felix.dependencymanager/src/org/apache/felix/dm/impl/ComponentImpl.java
Sun Dec  4 23:28:02 2016
@@ -548,8 +548,9 @@ public class ComponentImpl implements Co
             catch (InvocationTargetException e) {
                 // the method itself threw an exception, log that
                 m_logger.log(Logger.LOG_ERROR, "Invocation of '" + methodName + "' failed.",
e.getCause());
+                callbackFound |= true; // we have found the callback and we don't want to
log a "callback not found" error
             }
-            catch (Throwable e) {
+            catch (Throwable e) { // IllegalArgumentException (wrong params passed to the
method), or IllegalAccessException (method can't be accessed)
                 m_logger.log(Logger.LOG_ERROR, "Could not invoke '" + methodName + "'.",
e);
             }
         }



Mime
View raw message