Fix the FELIX-751 issue.
The setter method for array field has a bad access. Private was used instead of 0. This access has an impact on the instruction to use to call the method (INVOKESPECIAL to INVOKEVIRTUAL).
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@701348 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java
index 9554ea5..c81e3f8 100644
--- a/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java
+++ b/ipojo/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java
@@ -188,6 +188,7 @@
if ((access & ACC_STATIC) == ACC_STATIC) { return super.visitMethod(access, name, desc, signature, exceptions); }
+
generateMethodHeader(access, name, desc, signature, exceptions);
@@ -299,6 +300,7 @@
GeneratorAdapter mv = new GeneratorAdapter(cv.visitMethod(access, name, desc, signature, exceptions), access, name, desc);
mv.visitCode();
+
Type returnType = Type.getReturnType(desc);
// Compute result and exception stack location
@@ -581,7 +583,7 @@
* @param type : contained type (inside the array)
*/
private void createArraySetter(String name, String desc, Type type) {
- MethodVisitor mv = cv.visitMethod(ACC_PRIVATE, "__set" + name, desc, null, null);
+ MethodVisitor mv = cv.visitMethod(0, "__set" + name, desc, null, null);
mv.visitCode();
String internalType = desc.substring(1);