Fix FELIX-2430
The super() invocation was not correctly computed. It wrongly guess that it is the first <init> call, but not necessary. Now, the super call detection check for the super class name.

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@955965 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/tests/core/service-providing/pom.xml b/ipojo/tests/core/service-providing/pom.xml
index 2ded653..9a27648 100644
--- a/ipojo/tests/core/service-providing/pom.xml
+++ b/ipojo/tests/core/service-providing/pom.xml
@@ -93,7 +93,6 @@
             </goals>

             <configuration>

               <ignoreAnnotations>true</ignoreAnnotations>

-              <ignoreEmbeddedSchemas>true</ignoreEmbeddedSchemas>

             </configuration>

           </execution>

         </executions>

diff --git a/ipojo/tests/manipulator/creation/pom.xml b/ipojo/tests/manipulator/creation/pom.xml
index 027daaf..b67984f 100644
--- a/ipojo/tests/manipulator/creation/pom.xml
+++ b/ipojo/tests/manipulator/creation/pom.xml
@@ -85,6 +85,7 @@
 			<plugin>

 				<groupId>org.apache.felix</groupId>

 				<artifactId>maven-ipojo-plugin</artifactId>

+                <version>1.7.0-SNAPSHOT</version>

 				<executions>

 					<execution>

 						<goals>

diff --git a/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/CallSuperConstructorWithNew.java b/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/CallSuperConstructorWithNew.java
new file mode 100644
index 0000000..e147d09
--- /dev/null
+++ b/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/CallSuperConstructorWithNew.java
@@ -0,0 +1,10 @@
+package org.apache.felix.ipojo.test.scenarios.component;
+
+public class CallSuperConstructorWithNew extends ParentClass {
+    
+    public CallSuperConstructorWithNew() {
+        super(new StringBuffer("test"));
+        System.out.println("plop");
+    } 
+
+}
diff --git a/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/ParentClass.java b/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/ParentClass.java
index 052ca83..5b6b99f 100644
--- a/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/ParentClass.java
+++ b/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/component/ParentClass.java
@@ -6,6 +6,10 @@
 
     public ParentClass(final String n) {
         name = n;
+    }
+    
+    public ParentClass(final StringBuffer n) {
+        name = n.toString();
     } 
 
 }
diff --git a/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java b/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java
index 605e339..b9fa25f 100644
--- a/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java
+++ b/ipojo/tests/manipulator/creation/src/main/java/org/apache/felix/ipojo/test/scenarios/manipulation/POJOCreation.java
@@ -233,6 +233,14 @@
         }

     }

     

+    public void testSuperCallWithNew() {

+        try {

+            helper.createComponentInstance("org.apache.felix.ipojo.test.scenarios.component.CallSuperConstructorWithNew");

+        } catch (Throwable e) {

+            fail(e.getMessage());

+        }

+    }

+    

     public void testSuperCallWithBC() {

         try {

             helper.createComponentInstance("org.apache.felix.ipojo.test.scenarios.component.CallSuperConstructorWithBC");

diff --git a/ipojo/tests/manipulator/creation/src/main/resources/metadata.xml b/ipojo/tests/manipulator/creation/src/main/resources/metadata.xml
index 947c46f..3fdacde 100644
--- a/ipojo/tests/manipulator/creation/src/main/resources/metadata.xml
+++ b/ipojo/tests/manipulator/creation/src/main/resources/metadata.xml
@@ -57,6 +57,7 @@
 	

 	<!-- Try calling super constructors -->

 	 <component classname="org.apache.felix.ipojo.test.scenarios.component.CallSuperConstructor" immediate="true"/>

+     <component classname="org.apache.felix.ipojo.test.scenarios.component.CallSuperConstructorWithNew" immediate="true"/>

 	 <component classname="org.apache.felix.ipojo.test.scenarios.component.CallSuperConstructorWithBC" immediate="true"/>

 	 

 	 <!--  Several constructors -->