You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@felix.apache.org by cl...@apache.org on 2009/04/14 15:41:38 UTC

svn commit: r764776 - /felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java

Author: clement
Date: Tue Apr 14 13:41:38 2009
New Revision: 764776

URL: http://svn.apache.org/viewvc?rev=764776&view=rev
Log:
Fix a NPE in the manipulator when a synthetized method is not found (during annotations migration).

Modified:
    felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java

Modified: felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java?rev=764776&r1=764775&r2=764776&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java (original)
+++ felix/trunk/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java Tue Apr 14 13:41:38 2009
@@ -214,7 +214,11 @@
         if ((access & ACC_STATIC) == ACC_STATIC) { return super.visitMethod(access, name, desc, signature, exceptions); }
 
         MethodDescriptor md = getMethodDescriptor(name, desc);
-        generateMethodHeader(access, name, desc, signature, exceptions, md.getAnnotations());
+        if (md == null) {
+            generateMethodHeader(access, name, desc, signature, exceptions, new ArrayList(0));
+        } else {
+            generateMethodHeader(access, name, desc, signature, exceptions, md.getAnnotations());
+        }
         
         String id = generateMethodFlag(name, desc);
         if (! m_methodFlags.contains(id)) {