Fix FELIX-4508 
Update to ASM 5.0.2
Update the manipulator to reflect the API changes introduced between ASM 3.3.1 (the previously used version) and ASM 5.0.2
Update the Felix Framework version to execute the manipulator tests


git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1592340 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/ipojo/handler/temporal/temporal-dependency-handler/pom.xml b/ipojo/handler/temporal/temporal-dependency-handler/pom.xml
index f523c28..166ea07 100644
--- a/ipojo/handler/temporal/temporal-dependency-handler/pom.xml
+++ b/ipojo/handler/temporal/temporal-dependency-handler/pom.xml
@@ -49,12 +49,12 @@
             <version>1.10.1</version>
         </dependency>
         <dependency>
-            <groupId>asm</groupId>
+            <groupId>org.ow2.asm</groupId>
             <artifactId>asm-all</artifactId>
-            <version>3.3.1</version>
+            <version>5.0.2</version>
             <exclusions>
                 <exclusion>
-                    <groupId>asm</groupId>
+                    <groupId>org.ow2.asm</groupId>
                     <artifactId>asm-tree</artifactId>
                 </exclusion>
             </exclusions>
diff --git a/ipojo/manipulator/manipulator-bom/pom.xml b/ipojo/manipulator/manipulator-bom/pom.xml
index a7a1133..a85b2c0 100644
--- a/ipojo/manipulator/manipulator-bom/pom.xml
+++ b/ipojo/manipulator/manipulator-bom/pom.xml
@@ -33,7 +33,7 @@
   <packaging>pom</packaging>
 
   <properties>
-    <asm.version>3.3.1</asm.version>
+    <asm.version>5.0.2</asm.version>
     <metadata.version>1.6.0</metadata.version>
   </properties>
 
@@ -50,12 +50,12 @@
         <version>${project.version}</version>
       </dependency>
       <dependency>
-        <groupId>asm</groupId>
+        <groupId>org.ow2.asm</groupId>
         <artifactId>asm-all</artifactId>
         <version>${asm.version}</version>
         <exclusions>
           <exclusion>
-            <groupId>asm</groupId>
+            <groupId>org.ow2.asm</groupId>
             <artifactId>asm-tree</artifactId>
           </exclusion>
         </exclusions>
diff --git a/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGetComponentInstance.java b/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGetComponentInstance.java
index bc8c635..63998f0 100644
--- a/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGetComponentInstance.java
+++ b/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGetComponentInstance.java
@@ -28,11 +28,14 @@
 import org.osgi.framework.ServiceReference;

 import org.ow2.chameleon.testing.helpers.BaseTest;

 

+import java.lang.reflect.Field;

+import java.lang.reflect.Method;

 import java.util.Arrays;

 import java.util.List;

 import java.util.Properties;

 

 import static junit.framework.Assert.assertEquals;

+import static junit.framework.Assert.assertNotNull;

 import static org.junit.Assert.*;

 

 /**

@@ -45,7 +48,7 @@
      * Check the getComponentInstance method.

      */

     @Test

-    public void testGetComponentInstance() {

+    public void testGetComponentInstance() throws NoSuchFieldException, IllegalAccessException, NoSuchMethodException {

         String factName = "Manipulation-FooProviderType-1";

         String compName = "FooProvider-1";

         ServiceReference ref = null;

@@ -75,9 +78,17 @@
 

         // Cast to POJO

         Pojo pojo = (Pojo) fs;

+        Field im = fs.getClass().getDeclaredField("__IM");

+        assertNotNull(im);

+        im.setAccessible(true);

+        assertNotNull(im.get(fs));

+

+        Method method = fs.getClass().getMethod("getComponentInstance");

+        assertNotNull(method);

 

         // GetComponentInstance

         ComponentInstance instance = pojo.getComponentInstance();

+        assertNotNull(instance);

         assertEquals("Check component instance name", instance.getInstanceName(), compName);

         assertEquals("Check component factory name", instance.getFactory().getName(), factName);

         assertNotNull("Instance description not null", instance.getInstanceDescription());

diff --git a/ipojo/manipulator/manipulator-it/pom.xml b/ipojo/manipulator/manipulator-it/pom.xml
index 8a811c5..99b94e2 100644
--- a/ipojo/manipulator/manipulator-it/pom.xml
+++ b/ipojo/manipulator/manipulator-it/pom.xml
@@ -16,391 +16,400 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-  <parent>
-    <groupId>org.apache.felix</groupId>
-    <artifactId>felix-parent</artifactId>
-    <version>2.1</version>
-    <relativePath>../../../pom/pom.xml</relativePath>
-  </parent>
-
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>org.apache.felix.ipojo.manipulator.manipulator-it</artifactId>
-  <version>1.11.3-SNAPSHOT</version>
-  <name>Apache Felix iPOJO Manipulator ~ Integration Tests</name>
-  <packaging>pom</packaging>
-
-  <properties>
-    <!-- Tests are enabled only when the 'test' profile is activated  -->
-    <skipTestExecution>true</skipTestExecution>
-
-    <exam.version>3.0.1</exam.version>
-    <url.version>1.5.1</url.version>
-
-    <felix.version>4.2.0</felix.version>
-    <equinox.version>3.9.0.v20130529-1710</equinox.version>
-    <knoperflerfish.version>6.0.2</knoperflerfish.version>
-  </properties>
-
-  <modules>
-    <module>ipojo-manipulator-manipulation-test</module>
-    <module>ipojo-manipulator-creation-test</module>
-    <module>ipojo-manipulator-manipulation-metadata-test</module>
-    <module>online-manipulator-it</module>
-  </modules>
-
-  <dependencyManagement>
-    <dependencies>
-      <dependency>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
         <groupId>org.apache.felix</groupId>
-        <artifactId>ipojo-manipulator-bom</artifactId>
-        <version>${project.version}</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
+        <artifactId>felix-parent</artifactId>
+        <version>2.1</version>
+        <relativePath>../../../pom/pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>org.apache.felix.ipojo.manipulator.manipulator-it</artifactId>
+    <version>1.11.3-SNAPSHOT</version>
+    <name>Apache Felix iPOJO Manipulator ~ Integration Tests</name>
+    <packaging>pom</packaging>
+
+    <properties>
+        <!-- Tests are enabled only when the 'test' profile is activated  -->
+        <skipTestExecution>true</skipTestExecution>
+
+        <exam.version>3.0.1</exam.version>
+        <url.version>1.5.1</url.version>
+
+        <felix.version>4.4.0</felix.version>
+        <equinox.version>3.9.0.v20130529-1710</equinox.version>
+        <knoperflerfish.version>6.0.2</knoperflerfish.version>
+    </properties>
+
+    <modules>
+        <module>ipojo-manipulator-manipulation-test</module>
+        <module>ipojo-manipulator-creation-test</module>
+        <module>ipojo-manipulator-manipulation-metadata-test</module>
+        <module>online-manipulator-it</module>
+    </modules>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>ipojo-manipulator-bom</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>2.5.1</version>
+                <configuration>
+                    <source>1.6</source>
+                    <target>1.6</target>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.servicemix.tooling</groupId>
+                <artifactId>depends-maven-plugin</artifactId>
+                <version>1.2</version>
+                <executions>
+                    <execution>
+                        <id>generate-config</id>
+                        <goals>
+                            <goal>generate-depends-file</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <!-- check src only (except remote resources additions) -->
+                    <includes>
+                        <include>src/**</include>
+                    </includes>
+                    <excludes>
+                        <exclude>src/main/appended-resources/**</exclude>
+                        <exclude>**/*.iml</exclude>
+                        <exclude>src/it/**/target/**</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <version>2.4</version>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>2.15</version>
+                <configuration>
+                    <skipTests>${skipTestExecution}</skipTests>
+                    <systemPropertyVariables>
+                        <!-- TIME_FACTOR can be set from the command line with -DTIME_FACTOR=9-->
+                        <TIME_FACTOR>${TIME_FACTOR}</TIME_FACTOR>
+                        <!-- Defined by the profiles -->
+                        <pax.exam.framework>${pax.exam.framework}</pax.exam.framework>
+                    </systemPropertyVariables>
+                </configuration>
+            </plugin>
+        </plugins>
+
+    </build>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-container-native</artifactId>
+            <version>${exam.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-junit4</artifactId>
+            <version>${exam.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.exam</groupId>
+            <artifactId>pax-exam-link-mvn</artifactId>
+            <version>${exam.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-aether</artifactId>
+            <version>${url.version}</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-core</artifactId>
+            <version>0.9.6</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>ch.qos.logback</groupId>
+            <artifactId>logback-classic</artifactId>
+            <version>0.9.6</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.9</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>1.9.5</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.tinybundles</groupId>
+            <artifactId>tinybundles</artifactId>
+            <version>1.0.0</version>
+        </dependency>
+
+        <!-- The tiny bundle extension must be before the manipulator version
+        to use the right version of the manipulator -->
+        <dependency>
+            <groupId>org.ow2.chameleon.testing</groupId>
+            <artifactId>tinybundles-ipojo</artifactId>
+            <version>0.3.0</version>
+            <scope>test</scope>
+        </dependency>
+
+        <!-- Define the tested version -->
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.manipulator</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo</artifactId>
+            <!-- To update before the release -->
+
+            <!--
+            if you are using a release version, be aware that this may introduce test failures as you should
+            update this version to the same version as the manipulator
+            -->
+            <!--<version>1.11.1</version>-->
+            <version>${project.version}</version>
+            <scope>provided</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.osgi</groupId>
+                    <artifactId>org.osgi.core</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.manipulator.online</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- End of tested version -->
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.configadmin</artifactId>
+            <version>1.6.0</version>
+            <scope>test</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>commons-io</groupId>
+            <artifactId>commons-io</artifactId>
+            <version>2.4</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ow2.chameleon.testing</groupId>
+            <artifactId>osgi-helpers</artifactId>
+            <version>0.6.1</version>
+            <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.osgi</groupId>
+                    <artifactId>org.osgi.core</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.log</artifactId>
+            <version>1.0.1</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.osgi</groupId>
+                    <artifactId>org.osgi.core</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+
+        <dependency>
+            <groupId>org.ops4j.pax.url</groupId>
+            <artifactId>pax-url-wrap</artifactId>
+            <version>1.5.2</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.easytesting</groupId>
+            <artifactId>fest-assert</artifactId>
+            <version>1.4</version>
+        </dependency>
     </dependencies>
-  </dependencyManagement>
 
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>2.5.1</version>
-        <configuration>
-          <source>1.6</source>
-          <target>1.6</target>
-        </configuration>
-      </plugin>
+    <profiles>
+        <profile>
+            <id>default</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <properties>
+                <pax.exam.framework>none</pax.exam.framework>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>org.osgi</groupId>
+                    <artifactId>org.osgi.compendium</artifactId>
+                    <version>4.3.0</version>
+                </dependency>
+                <dependency>
+                    <groupId>org.osgi</groupId>
+                    <artifactId>org.osgi.core</artifactId>
+                    <version>4.3.1</version>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
+            <id>knopflerfish</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+                <property>
+                    <name>pax.exam.framework</name>
+                    <value>knopflerfish</value>
+                </property>
+            </activation>
+            <properties>
+                <pax.exam.framework>knopflerfish</pax.exam.framework>
+            </properties>
+            <repositories>
+                <repository>
+                    <id>knopflerfish-releases</id>
+                    <url>http://www.knopflerfish.org/maven2</url>
+                </repository>
+            </repositories>
+            <dependencies>
+                <dependency>
+                    <groupId>org.knopflerfish</groupId>
+                    <artifactId>framework</artifactId>
+                    <version>${knoperflerfish.version}</version>
+                    <scope>test</scope>
+                </dependency>
+                <dependency>
+                    <!-- must be after KF -->
+                    <groupId>org.osgi</groupId>
+                    <artifactId>org.osgi.core</artifactId>
+                    <version>4.3.1</version>
+                </dependency>
+            </dependencies>
+        </profile>
 
-      <plugin>
-        <groupId>org.apache.servicemix.tooling</groupId>
-        <artifactId>depends-maven-plugin</artifactId>
-        <version>1.2</version>
-        <executions>
-          <execution>
-            <id>generate-config</id>
-            <goals>
-              <goal>generate-depends-file</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
+        <profile>
+            <id>equinox</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+                <property>
+                    <name>pax.exam.framework</name>
+                    <value>equinox</value>
+                </property>
+            </activation>
+            <properties>
+                <pax.exam.framework>equinox</pax.exam.framework>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>org.osgi</groupId>
+                    <artifactId>org.osgi.compendium</artifactId>
+                    <version>4.3.0</version>
+                </dependency>
+                <dependency>
+                    <groupId>org.eclipse.tycho</groupId>
+                    <artifactId>org.eclipse.osgi</artifactId>
+                    <version>${equinox.version}</version>
+                    <scope>test</scope>
+                </dependency>
+                <dependency>
+                    <!-- must be after equinox -->
+                    <groupId>org.osgi</groupId>
+                    <artifactId>org.osgi.core</artifactId>
+                    <version>4.3.1</version>
+                </dependency>
+            </dependencies>
+        </profile>
 
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>verify</phase>
-            <goals>
-              <goal>check</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <!-- check src only (except remote resources additions) -->
-          <includes>
-            <include>src/**</include>
-          </includes>
-          <excludes>
-            <exclude>src/main/appended-resources/**</exclude>
-            <exclude>**/*.iml</exclude>
-            <exclude>src/it/**/target/**</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
+        <profile>
+            <id>felix</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+                <property>
+                    <name>pax.exam.framework</name>
+                    <value>felix</value>
+                </property>
+            </activation>
+            <properties>
+                <pax.exam.framework>felix</pax.exam.framework>
+            </properties>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.apache.felix.framework</artifactId>
+                    <version>${felix.version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
 
-      <plugin>
-        <artifactId>maven-deploy-plugin</artifactId>
-        <version>2.4</version>
-        <configuration>
-          <skip>true</skip>
-        </configuration>
-      </plugin>
-
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <version>2.15</version>
-        <configuration>
-          <skipTests>${skipTestExecution}</skipTests>
-          <systemPropertyVariables>
-            <!-- TIME_FACTOR can be set from the command line with -DTIME_FACTOR=9-->
-            <TIME_FACTOR>${TIME_FACTOR}</TIME_FACTOR>
-            <!-- Defined by the profiles -->
-            <pax.exam.framework>${pax.exam.framework}</pax.exam.framework>
-          </systemPropertyVariables>
-        </configuration>
-      </plugin>
-    </plugins>
-
-  </build>
-
-  <dependencies>
-    <dependency>
-      <groupId>org.ops4j.pax.exam</groupId>
-      <artifactId>pax-exam-container-native</artifactId>
-      <version>${exam.version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.ops4j.pax.exam</groupId>
-      <artifactId>pax-exam-junit4</artifactId>
-      <version>${exam.version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.ops4j.pax.exam</groupId>
-      <artifactId>pax-exam-link-mvn</artifactId>
-      <version>${exam.version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.ops4j.pax.url</groupId>
-      <artifactId>pax-url-aether</artifactId>
-      <version>${url.version}</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>ch.qos.logback</groupId>
-      <artifactId>logback-core</artifactId>
-      <version>0.9.6</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>ch.qos.logback</groupId>
-      <artifactId>logback-classic</artifactId>
-      <version>0.9.6</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.9</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
-      <version>1.9.5</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.ops4j.pax.tinybundles</groupId>
-      <artifactId>tinybundles</artifactId>
-      <version>1.0.0</version>
-    </dependency>
-
-    <!-- The tiny bundle extension must be before the manipulator version
-    to use the right version of the manipulator -->
-    <dependency>
-      <groupId>org.ow2.chameleon.testing</groupId>
-      <artifactId>tinybundles-ipojo</artifactId>
-      <version>0.3.0</version>
-      <scope>test</scope>
-    </dependency>
-
-    <!-- Define the tested version -->
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.ipojo.manipulator</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.ipojo</artifactId>
-      <!-- To update before the release -->
-
-      <!--
-      if you are using a release version, be aware that this may introduce test failures as you should
-      update this version to the same version as the manipulator
-      -->
-      <!--<version>1.11.1</version>-->
-      <version>${project.version}</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.ipojo.manipulator.online</artifactId>
-      <version>${project.version}</version>
-    </dependency>
-
-    <!-- End of tested version -->
-
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.configadmin</artifactId>
-      <version>1.6.0</version>
-      <scope>test</scope>
-    </dependency>
-
-    <dependency>
-      <groupId>commons-io</groupId>
-      <artifactId>commons-io</artifactId>
-      <version>2.4</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.ow2.chameleon.testing</groupId>
-      <artifactId>osgi-helpers</artifactId>
-      <version>0.6.1</version>
-      <scope>test</scope>
-      <exclusions>
-        <exclusion>
-          <groupId>org.osgi</groupId>
-          <artifactId>org.osgi.core</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.log</artifactId>
-      <version>1.0.1</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.osgi</groupId>
-          <artifactId>org.osgi.core</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-
-    <dependency>
-      <groupId>org.ops4j.pax.url</groupId>
-      <artifactId>pax-url-wrap</artifactId>
-      <version>1.5.2</version>
-    </dependency>
-
-    <dependency>
-      <groupId>org.easytesting</groupId>
-      <artifactId>fest-assert</artifactId>
-      <version>1.4</version>
-    </dependency>
-  </dependencies>
-
-  <profiles>
-    <profile>
-      <id>default</id>
-      <activation>
-        <activeByDefault>true</activeByDefault>
-      </activation>
-      <properties>
-        <pax.exam.framework>none</pax.exam.framework>
-      </properties>
-      <dependencies>
-        <dependency>
-          <groupId>org.osgi</groupId>
-          <artifactId>org.osgi.compendium</artifactId>
-          <version>4.3.0</version>
-        </dependency>
-        <dependency>
-          <groupId>org.osgi</groupId>
-          <artifactId>org.osgi.core</artifactId>
-          <version>4.3.1</version>
-        </dependency>
-      </dependencies>
-    </profile>
-    <profile>
-      <id>knopflerfish</id>
-      <activation>
-        <activeByDefault>false</activeByDefault>
-        <property>
-          <name>pax.exam.framework</name>
-          <value>knopflerfish</value>
-        </property>
-      </activation>
-      <properties>
-        <pax.exam.framework>knopflerfish</pax.exam.framework>
-      </properties>
-      <repositories>
-        <repository>
-          <id>knopflerfish-releases</id>
-          <url>http://www.knopflerfish.org/maven2</url>
-        </repository>
-      </repositories>
-      <dependencies>
-        <dependency>
-          <groupId>org.knopflerfish</groupId>
-          <artifactId>framework</artifactId>
-          <version>${knoperflerfish.version}</version>
-          <scope>test</scope>
-        </dependency>
-        <dependency>
-          <!-- must be after KF -->
-          <groupId>org.osgi</groupId>
-          <artifactId>org.osgi.core</artifactId>
-          <version>4.3.1</version>
-        </dependency>
-      </dependencies>
-    </profile>
-
-    <profile>
-      <id>equinox</id>
-      <activation>
-        <activeByDefault>false</activeByDefault>
-        <property>
-          <name>pax.exam.framework</name>
-          <value>equinox</value>
-        </property>
-      </activation>
-      <properties>
-        <pax.exam.framework>equinox</pax.exam.framework>
-      </properties>
-      <dependencies>
-        <dependency>
-          <groupId>org.osgi</groupId>
-          <artifactId>org.osgi.compendium</artifactId>
-          <version>4.3.0</version>
-        </dependency>
-        <dependency>
-          <groupId>org.eclipse.tycho</groupId>
-          <artifactId>org.eclipse.osgi</artifactId>
-          <version>${equinox.version}</version>
-          <scope>test</scope>
-        </dependency>
-        <dependency>
-          <!-- must be after equinox -->
-          <groupId>org.osgi</groupId>
-          <artifactId>org.osgi.core</artifactId>
-          <version>4.3.1</version>
-        </dependency>
-      </dependencies>
-    </profile>
-
-    <profile>
-      <id>felix</id>
-      <activation>
-        <activeByDefault>false</activeByDefault>
-        <property>
-          <name>pax.exam.framework</name>
-          <value>felix</value>
-        </property>
-      </activation>
-      <properties>
-        <pax.exam.framework>felix</pax.exam.framework>
-      </properties>
-      <dependencies>
-        <dependency>
-          <groupId>org.apache.felix</groupId>
-          <artifactId>org.apache.felix.framework</artifactId>
-          <version>${felix.version}</version>
-        </dependency>
-      </dependencies>
-    </profile>
-
-    <profile>
-      <id>test</id>
-      <properties>
-        <skipTestExecution>false</skipTestExecution>
-      </properties>
-    </profile>
-  </profiles>
+        <profile>
+            <id>test</id>
+            <properties>
+                <skipTestExecution>false</skipTestExecution>
+            </properties>
+        </profile>
+    </profiles>
 </project>
diff --git a/ipojo/manipulator/manipulator/pom.xml b/ipojo/manipulator/manipulator/pom.xml
index 4c3fbfa..484f362 100644
--- a/ipojo/manipulator/manipulator/pom.xml
+++ b/ipojo/manipulator/manipulator/pom.xml
@@ -39,9 +39,9 @@
 
   <dependencies>
     <dependency>
-      <groupId>asm</groupId>
+      <groupId>org.ow2.asm</groupId>
       <artifactId>asm-all</artifactId>
-      <version>3.3.1</version>
+      <version>5.0.2</version>
     </dependency>
     <dependency>
       <groupId>org.apache.felix</groupId>
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java
index 333c9db..1c2fc36 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java
@@ -19,23 +19,17 @@
 

 package org.apache.felix.ipojo.manipulation;

 

-import java.util.*;

+import org.objectweb.asm.*;

 

-import org.objectweb.asm.AnnotationVisitor;

-import org.objectweb.asm.ClassVisitor;

-import org.objectweb.asm.FieldVisitor;

-import org.objectweb.asm.Label;

-import org.objectweb.asm.MethodVisitor;

-import org.objectweb.asm.Opcodes;

-import org.objectweb.asm.Type;

-import org.objectweb.asm.commons.EmptyVisitor;

+import java.util.*;

 

 /**

  * Checks that a POJO is already manipulated or not.

  * Moreover it allows to get manipulation data about this class.

+ *

  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>

  */

-public class ClassChecker extends EmptyVisitor implements ClassVisitor, Opcodes {

+public class ClassChecker extends ClassVisitor implements Opcodes {

 

     /**

      * True if the class is already manipulated.

@@ -73,30 +67,29 @@
     private Map<String, List<MethodDescriptor>> m_inners = new LinkedHashMap<String, List<MethodDescriptor>>();

 

     /**

-     * <code>true</code> if the class supports annotations.

-     * This enables the analysis of the code to find and moves annotations.

-     */

-    private boolean m_supportAnnotation = false;

-

-    /**

      * Class Version.

      * Used to determine the frame format.

      */

     private int m_classVersion;

 

+    public ClassChecker() {

+        super(Opcodes.ASM5);

+    }

+

     /**

      * Check if the _cm field already exists.

      * Update the field list.

-     * @param access : access of the field

-     * @param name : name of the field

-     * @param desc : description of the field

+     *

+     * @param access    : access of the field

+     * @param name      : name of the field

+     * @param desc      : description of the field

      * @param signature : signature of the field

-     * @param value : value of the field (for static field only)

+     * @param value     : value of the field (for static field only)

      * @return the field visitor

      * @see org.objectweb.asm.ClassVisitor#visitField(int, java.lang.String, java.lang.String, java.lang.String, java.lang.Object)

      */

     public FieldVisitor visitField(int access, String name, String desc,

-            String signature, Object value) {

+                                   String signature, Object value) {

         if (name.equals(MethodCreator.IM_FIELD)

                 && desc.equals("Lorg/apache/felix/ipojo/InstanceManager;")) {

             m_isAlreadyManipulated = true;

@@ -137,16 +130,17 @@
     /**

      * Add the inner class to the list of inner class to manipulate.

      * The method checks that the inner class is really owned by the implementation class.

-     * @param name inner class qualified name

+     *

+     * @param name      inner class qualified name

      * @param outerName outer class name (may be null for anonymous class)

      * @param innerName inner class simple (i.e. short) name

-     * @param access inner class visibility

-     * @see org.objectweb.asm.commons.EmptyVisitor#visitInnerClass(java.lang.String, java.lang.String, java.lang.String, int)

+     * @param access    inner class visibility

+     * @see org.objectweb.asm.ClassVisitor#visitInnerClass(java.lang.String, java.lang.String, java.lang.String, int)

      */

     public void visitInnerClass(String name, String outerName, String innerName, int access) {

-        if (m_className.equals(outerName)  || outerName == null) { // Anonymous classes does not have an outer class.

+        if (m_className.equals(outerName) || outerName == null) { // Anonymous classes does not have an outer class.

             // Do not include inner static class

-            if (! ((access & ACC_STATIC) == ACC_STATIC)) {

+            if (!((access & ACC_STATIC) == ACC_STATIC)) {

                 m_inners.put(name, new ArrayList<MethodDescriptor>());

             }

         }

@@ -155,6 +149,7 @@
 

     /**

      * Check if the class was already manipulated.

+     *

      * @return true if the class is already manipulated.

      */

     public boolean isAlreadyManipulated() {

@@ -163,6 +158,7 @@
 

     /**

      * Gets the extracted class version

+     *

      * @return the class version.

      */

     public int getClassVersion() {

@@ -172,21 +168,21 @@
     /**

      * Visit the class.

      * Update the implemented interface list.

-     * @param version : version of the class

-     * @param access : access of the class

-     * @param name : name of the class

-     * @param signature : signature of the class

-     * @param superName : super class of the class

+     *

+     * @param version    : version of the class

+     * @param access     : access of the class

+     * @param name       : name of the class

+     * @param signature  : signature of the class

+     * @param superName  : super class of the class

      * @param interfaces : implemented interfaces.

      * @see org.objectweb.asm.ClassVisitor#visit(int, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])

      */

     public void visit(int version, int access, String name, String signature,

-            String superName, String[] interfaces) {

+                      String superName, String[] interfaces) {

 

         m_classVersion = version;

-        m_supportAnnotation = version > V1_4 && version < V1_1;

 

-        if (! superName.equals("java/lang/Object")) {

+        if (!superName.equals("java/lang/Object")) {

             m_superClass = superName.replace('/', '.');

         }

 

@@ -202,16 +198,17 @@
     /**

      * Visit a method.

      * Update the method list (except if it init or clinit.

-     * @param  access - the method's access flags (see Opcodes). This parameter also indicates if the method is synthetic and/or deprecated.

-     * @param name - the method's name.

-     * @param desc - the method's descriptor (see Type).

-     * @param signature - the method's signature. May be null if the method parameters, return type and exceptions do not use generic types.

+     *

+     * @param access     - the method's access flags (see Opcodes). This parameter also indicates if the method is synthetic and/or deprecated.

+     * @param name       - the method's name.

+     * @param desc       - the method's descriptor (see Type).

+     * @param signature  - the method's signature. May be null if the method parameters, return type and exceptions do not use generic types.

      * @param exceptions - the internal names of the method's exception classes (see getInternalName). May be null.

      * @return nothing.

      * @see org.objectweb.asm.ClassVisitor#visitMethod(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])

      */

     public MethodVisitor visitMethod(int access, String name, String desc,

-            String signature, String[] exceptions) {

+                                     String signature, String[] exceptions) {

         if (!name.equals("<clinit>")) {

 

             if (name.equals("<init>")) {

@@ -287,6 +284,7 @@
 

     /**

      * Get collected interfaces.

+     *

      * @return the interfaces implemented by the component class.

      */

     public List<String> getInterfaces() {

@@ -295,6 +293,7 @@
 

     /**

      * Get collected fields.

+     *

      * @return the field map [field_name, type].

      */

     public Map<String, String> getFields() {

@@ -303,6 +302,7 @@
 

     /**

      * Get collected methods.

+     *

      * @return the method list of [method, signature].

      */

     public List<MethodDescriptor> getMethods() {

@@ -330,9 +330,10 @@
      * This class creates an {@link AnnotationDescriptor}

      * if an annotation is found during the visit.

      * It also collects local variables definition.

-     *  @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>

+     *

+     * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>

      */

-    private final class MethodInfoCollector extends EmptyVisitor {

+    private final class MethodInfoCollector extends MethodVisitor {

         /**

          * The method descriptor of the visited method.

          */

@@ -340,9 +341,11 @@
 

         /**

          * Creates an annotation collector.

+         *

          * @param md the method descriptor of the visited method.

          */

         private MethodInfoCollector(MethodDescriptor md) {

+            super(Opcodes.ASM5);

             m_method = md;

         }

 

@@ -352,21 +355,22 @@
          * creates the {@link AnnotationDescriptor} corresponding to this annotation

          * to visit this annotation. This {@link AnnotationDescriptor} is added to

          * the {@link MethodDescriptor} of the visited method.

-         * @param name the name of the annotation

+         *

+         * @param name    the name of the annotation

          * @param visible is the annotation visible at runtime

          * @return the {@link AnnotationDescriptor} to visit this annotation or

          * <code>null</code> if the annotation is not visible.

-         * @see org.objectweb.asm.commons.EmptyVisitor#visitAnnotation(java.lang.String, boolean)

+         * @see org.objectweb.asm.MethodVisitor#visitAnnotation(java.lang.String, boolean)

          */

         public AnnotationVisitor visitAnnotation(String name, boolean visible) {

             if (visible) {

-                AnnotationDescriptor ann = new AnnotationDescriptor(name, visible);

+                AnnotationDescriptor ann = new AnnotationDescriptor(name, true);

                 m_method.addAnnotation(ann);

                 return ann;

             }

             return null;

         }

-        

+

         public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) {

             m_method.addLocalVariable(name, desc, signature, index);

         }

@@ -376,9 +380,9 @@
         }

 

         public AnnotationVisitor visitParameterAnnotation(int id,

-                String name, boolean visible) {

+                                                          String name, boolean visible) {

             if (visible) {

-                AnnotationDescriptor ann = new AnnotationDescriptor(name, visible);

+                AnnotationDescriptor ann = new AnnotationDescriptor(name, true);

                 m_method.addParameterAnnotation(id, ann);

                 return ann;

             }

@@ -387,13 +391,12 @@
              * It is harmless to keep injected parameter annotations on original constructor

              * for correct property resolution in case of re-manipulation

              */

-            if(m_method.getName().equals("$init"))

-            {

-            	AnnotationDescriptor ann = new AnnotationDescriptor(name, visible);

+            if (m_method.getName().equals("$init")) {

+                AnnotationDescriptor ann = new AnnotationDescriptor(name, false);

                 m_method.addParameterAnnotation(id, ann);

                 return ann;

             }

-            

+

             return null;

         }

 

@@ -407,9 +410,10 @@
      * {@link AnnotationVisitor} in order to create the copy.

      * This class contains a <code>visit</code> method re-injecting the

      * annotation in the generated method.

+     *

      * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>

      */

-    public class AnnotationDescriptor implements AnnotationVisitor {

+    public class AnnotationDescriptor extends AnnotationVisitor {

         /**

          * The name of the annotation.

          */

@@ -447,10 +451,12 @@
         /**

          * Creates an annotation descriptor.

          * This constructor is used for 'root' annotations.

-         * @param name the name of the  annotation

+         *

+         * @param name    the name of the  annotation

          * @param visible the visibility of the annotation at runtime

          */

         public AnnotationDescriptor(String name, boolean visible) {

+            super(Opcodes.ASM5);

             m_name = name;

             m_visible = visible;

         }

@@ -458,10 +464,12 @@
         /**

          * Creates an annotation descriptor.

          * This constructor is used for nested annotations.

+         *

          * @param name the name of the  annotation

          * @param desc the descriptor of the annotation

          */

         public AnnotationDescriptor(String name, String desc) {

+            super(Opcodes.ASM5);

             m_name = name;

             m_visible = true;

             m_desc = desc;

@@ -470,6 +478,7 @@
 

         /**

          * Visits a simple attribute.

+         *

          * @param arg0 the attribute name

          * @param arg1 the attribute value

          * @see org.objectweb.asm.AnnotationVisitor#visit(java.lang.String, java.lang.Object)

@@ -481,6 +490,7 @@
 

         /**

          * Visits a nested annotation.

+         *

          * @param arg0 the attribute name

          * @param arg1 the annotation descriptor

          * @return the annotation visitor parsing the nested annotation

@@ -495,6 +505,7 @@
 

         /**

          * Visits an array attribute.

+         *

          * @param arg0 the name of the attribute

          * @return the annotation visitor parsing the content of the array,

          * uses a specific {@link ArrayAttribute} to parse this array

@@ -509,13 +520,16 @@
 

         /**

          * End of the visit.

+         *

          * @see org.objectweb.asm.AnnotationVisitor#visitEnd()

          */

-        public void visitEnd() { }

+        public void visitEnd() {

+        }

 

 

         /**

          * Visits an enumeration attribute.

+         *

          * @param arg0 the attribute name

          * @param arg1 the enumeration descriptor

          * @param arg2 the attribute value

@@ -530,21 +544,22 @@
          * into the destination method.

          * This method recreate the annotations itself and any other

          * attributes.

+         *

          * @param mv the method visitor visiting the destination method.

          */

         public void visitAnnotation(MethodVisitor mv) {

             AnnotationVisitor av = mv.visitAnnotation(m_name, m_visible);

-            for (int i = 0; i < m_simples.size(); i++) {

-                m_simples.get(i).visit(av);

+            for (SimpleAttribute simple : m_simples) {

+                simple.visit(av);

             }

-            for (int i = 0; i < m_enums.size(); i++) {

-                m_enums.get(i).visit(av);

+            for (EnumAttribute en : m_enums) {

+                en.visit(av);

             }

-            for (int i = 0; i < m_nested.size(); i++) {

-                m_nested.get(i).visit(av);

+            for (AnnotationDescriptor nested : m_nested) {

+                nested.visit(av);

             }

-            for (int i = 0; i < m_arrays.size(); i++) {

-                m_arrays.get(i).visit(av);

+            for (ArrayAttribute array : m_arrays) {

+                array.visit(av);

             }

             av.visitEnd();

         }

@@ -554,22 +569,23 @@
          * into the destination method.

          * This method recreate the annotations itself and any other

          * attributes.

+         *

          * @param id the paramter id

          * @param mv the method visitor visiting the destination method.

          */

         public void visitParameterAnnotation(int id, MethodVisitor mv) {

             AnnotationVisitor av = mv.visitParameterAnnotation(id, m_name, m_visible);

-            for (int i = 0; i < m_simples.size(); i++) {

-                m_simples.get(i).visit(av);

+            for (SimpleAttribute simple : m_simples) {

+                simple.visit(av);

             }

-            for (int i = 0; i < m_enums.size(); i++) {

-                m_enums.get(i).visit(av);

+            for (EnumAttribute en : m_enums) {

+                en.visit(av);

             }

-            for (int i = 0; i < m_nested.size(); i++) {

-                m_nested.get(i).visit(av);

+            for (AnnotationDescriptor nested : m_nested) {

+                nested.visit(av);

             }

-            for (int i = 0; i < m_arrays.size(); i++) {

-                m_arrays.get(i).visit(av);

+            for (ArrayAttribute array : m_arrays) {

+                array.visit(av);

             }

             av.visitEnd();

         }

@@ -578,22 +594,23 @@
          * Method allowing to recreate the visited (stored) annotation

          * into the destination annotation. This method is used only

          * for nested annotation.

+         *

          * @param mv the annotation visitor to populate with the stored

-         * annotation

+         *           annotation

          */

         public void visit(AnnotationVisitor mv) {

             AnnotationVisitor av = mv.visitAnnotation(m_name, m_desc);

-            for (int i = 0; i < m_simples.size(); i++) {

-                m_simples.get(i).visit(av);

+            for (SimpleAttribute simple : m_simples) {

+                simple.visit(av);

             }

-            for (int i = 0; i < m_enums.size(); i++) {

-                m_enums.get(i).visit(av);

+            for (EnumAttribute enu : m_enums) {

+                enu.visit(av);

             }

-            for (int i = 0; i < m_nested.size(); i++) {

-                m_nested.get(i).visit(av);

+            for (AnnotationDescriptor nested : m_nested) {

+                nested.visit(av);

             }

-            for (int i = 0; i < m_arrays.size(); i++) {

-                m_arrays.get(i).visit(av);

+            for (ArrayAttribute array : m_arrays) {

+                array.visit(av);

             }

             av.visitEnd();

         }

@@ -605,9 +622,10 @@
      * Describes an array attribute.

      * This class is able to visit an annotation array attribute, and to

      * recreate this array on another annotation.

+     *

      * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>

      */

-    public class ArrayAttribute implements AnnotationVisitor {

+    public class ArrayAttribute extends AnnotationVisitor {

         /**

          * The name of the attribute.

          */

@@ -619,15 +637,18 @@
 

         /**

          * Creates an array attribute.

+         *

          * @param name the name of the attribute.

          */

         public ArrayAttribute(String name) {

+            super(Opcodes.ASM5);

             m_name = name;

         }

 

         /**

          * Visits the content of the array. This method is called for

          * simple values.

+         *

          * @param arg0 <code>null</code>

          * @param arg1 the value

          * @see org.objectweb.asm.AnnotationVisitor#visit(java.lang.String, java.lang.Object)

@@ -639,6 +660,7 @@
         /**

          * Visits the content of the array. This method is called for

          * nested annotations (annotations contained in the array).

+         *

          * @param arg0 <code>null</code>

          * @param arg1 the annotation descriptor

          * @return an {@link AnnotationDescriptor} which creates a copy of

@@ -654,6 +676,7 @@
         /**

          * Visits the content of the array. This method is called for

          * nested arrays (arrays contained in the array).

+         *

          * @param arg0 <code>null</code>

          * @return an {@link AnnotationVisitor} which creates a copy of

          * the contained array.

@@ -667,13 +690,16 @@
 

         /**

          * End of the array attribute visit.

+         *

          * @see org.objectweb.asm.AnnotationVisitor#visitEnd()

          */

-        public void visitEnd() {  }

+        public void visitEnd() {

+        }

 

         /**

          * Visits the content of the array. This method is called for

          * enumeration values.

+         *

          * @param arg0 <code>null</code>

          * @param arg1 the enumeration descriptor

          * @param arg2 the value

@@ -688,13 +714,13 @@
          * Recreates the visited array attribute. This method

          * handle the generation of the object embedded in the

          * array.

+         *

          * @param av the annotation visitor on which the array attribute

-         * needs to be injected.

+         *           needs to be injected.

          */

         public void visit(AnnotationVisitor av) {

             AnnotationVisitor content = av.visitArray(m_name);

-            for (int i = 0; i < m_content.size(); i++) {

-                Object component = m_content.get(i);

+            for (Object component : m_content) {

                 if (component instanceof AnnotationDescriptor) {

                     ((AnnotationDescriptor) component).visit(content);

                 } else if (component instanceof EnumAttribute) {

@@ -714,6 +740,7 @@
      * Describes a simple attribute.

      * This class is able to visit an annotation simple attribute, and to

      * recreate this attribute on another annotation.

+     *

      * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>

      */

     public static final class SimpleAttribute {

@@ -728,7 +755,8 @@
 

         /**

          * Creates a simple attribute.

-         * @param name the name of the attribute

+         *

+         * @param name   the name of the attribute

          * @param object the value of the attribute

          */

         private SimpleAttribute(String name, Object object) {

@@ -738,8 +766,9 @@
 

         /**

          * Recreates the attribute on the given annotation.

+         *

          * @param visitor the visitor on which the attribute needs

-         * to be injected.

+         *                to be injected.

          */

         public void visit(AnnotationVisitor visitor) {

             visitor.visit(m_name, m_value);

@@ -751,6 +780,7 @@
      * value.

      * This class is able to visit an annotation enumeration attribute, and to

      * recreate this attribute on another annotation.

+     *

      * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>

      */

     public static final class EnumAttribute {

@@ -769,8 +799,9 @@
 

         /**

          * Creates a enumeration attribute.

-         * @param name the name of the attribute.

-         * @param desc the descriptor of the {@link Enum}

+         *

+         * @param name  the name of the attribute.

+         * @param desc  the descriptor of the {@link Enum}

          * @param value the enumerated value

          */

         private EnumAttribute(String name, String desc, String value) {

@@ -781,8 +812,9 @@
 

         /**

          * Recreates the attribute on the given annotation.

+         *

          * @param visitor the visitor on which the attribute needs

-         * to be injected.

+         *                to be injected.

          */

         public void visit(AnnotationVisitor visitor) {

             visitor.visitEnum(m_name, m_desc, m_value);

@@ -794,15 +826,19 @@
     /**

      * Class required to detect inner classes assigned to static field and thus must not be manipulated (FELIX-4347).

      * If an inner class is assigned to a static field, it must not be manipulated.

-     *

+     * <p/>

      * However notice that this is only useful when AspectJ is used, because aspectJ is changing the 'staticity' of

      * the inner class.

      */

-    private class InnerClassAssignedToStaticFieldDetector extends EmptyVisitor implements MethodVisitor {

+    private class InnerClassAssignedToStaticFieldDetector extends MethodVisitor {

+

+        public InnerClassAssignedToStaticFieldDetector() {

+            super(Opcodes.ASM5);

+        }

 

         @Override

         public void visitTypeInsn(int opcode, String type) {

-            if (opcode == NEW  && m_inners.containsKey(type)) {

+            if (opcode == NEW && m_inners.containsKey(type)) {

                 m_inners.remove(type);

             }

         }

diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java
index 268f903..94b1205 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java
@@ -19,8 +19,6 @@
 
 package org.apache.felix.ipojo.manipulation;
 
-import java.util.Set;
-
 import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.util.Names;
 import org.objectweb.asm.AnnotationVisitor;
 import org.objectweb.asm.Label;
@@ -28,6 +26,8 @@
 import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.commons.GeneratorAdapter;
 
+import java.util.Set;
+
 
 /**
  * Constructor Adapter.
@@ -73,7 +73,7 @@
      * @param name   the name
      */
     public ConstructorCodeAdapter(final MethodVisitor mv, final String owner, Set<String> fields, int access, String name, String desc, String superClass) {
-        super(mv, access, name, desc);
+        super(Opcodes.ASM5, mv, access, name, desc);
         m_owner = owner;
         m_superDetected = false;
         m_fields = fields;
@@ -89,15 +89,15 @@
      * @param name    the name of the annotation
      * @param visible the annotation visibility
      * @return the <code>null</code> if the annotation is visible, otherwise returns
-     *         {@link GeneratorAdapter#visitAnnotation(String, boolean)}
-     * @see org.objectweb.asm.MethodAdapter#visitAnnotation(java.lang.String, boolean)
+     * {@link GeneratorAdapter#visitAnnotation(String, boolean)}
+     * @see org.objectweb.asm.commons.GeneratorAdapter#visitAnnotation(java.lang.String, boolean)
      */
     public AnnotationVisitor visitAnnotation(String name, boolean visible) {
         // Annotations are moved to the injected constructor.
         if (visible) {
             return null;
         } else {
-            return super.visitAnnotation(name, visible);
+            return super.visitAnnotation(name, false);
         }
     }
 
@@ -155,11 +155,11 @@
         if (m_fields.contains(name) && m_owner.equals(owner)) {
             if (opcode == GETFIELD) {
                 String gDesc = "()" + desc;
-                mv.visitMethodInsn(INVOKEVIRTUAL, owner, "__get" + name, gDesc);
+                mv.visitMethodInsn(INVOKEVIRTUAL, owner, "__get" + name, gDesc, false);
                 return;
             } else if (opcode == PUTFIELD) {
                 String sDesc = "(" + desc + ")V";
-                mv.visitMethodInsn(INVOKEVIRTUAL, owner, "__set" + name, sDesc);
+                mv.visitMethodInsn(INVOKEVIRTUAL, owner, "__set" + name, sDesc, false);
                 return;
             }
         }
@@ -175,9 +175,10 @@
      * @param owner  the class owning the invoked method
      * @param name   the method name
      * @param desc   the method descriptor
-     * @see org.objectweb.asm.MethodAdapter#visitMethodInsn(int, java.lang.String, java.lang.String, java.lang.String)
+     * @param itf    if the method's owner class is an interface
+     * @see org.objectweb.asm.commons.GeneratorAdapter#visitMethodInsn(int, java.lang.String, java.lang.String, java.lang.String)
      */
-    public void visitMethodInsn(int opcode, String owner, String name, String desc) {
+    public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
 
         // A method call is detected, check if it is the super call :
         // the first init is not necessary the super call, so check that it is really the super class.
@@ -188,17 +189,22 @@
 
             //mv.visitVarInsn(ALOAD, 0); The ALOAD 0 was already visited. This previous visit allows
             // Super constructor parameters.
-            mv.visitMethodInsn(opcode, owner, name, desc); // Super constructor invocation
+            mv.visitMethodInsn(opcode, owner, name, desc, false); // Super constructor invocation
 
             // 2) Load the object and the component manager argument
             mv.visitVarInsn(ALOAD, 0);
             //mv.visitVarInsn(ALOAD, Type.getArgumentTypes(m_constructorDesc).length);
             mv.visitVarInsn(ALOAD, 1);  // CM is always the first argument
             // 3) Initialize the field
-            mv.visitMethodInsn(INVOKESPECIAL, m_owner, "_setInstanceManager", "(Lorg/apache/felix/ipojo/InstanceManager;)V");
+            mv.visitMethodInsn(INVOKESPECIAL, m_owner, "_setInstanceManager",
+                    "(Lorg/apache/felix/ipojo/InstanceManager;)V", false);
 
         } else {
-            mv.visitMethodInsn(opcode, owner, name, desc);
+            if (opcode == INVOKEINTERFACE) {
+                mv.visitMethodInsn(opcode, owner, name, desc, true);
+            } else {
+                mv.visitMethodInsn(opcode, owner, name, desc, false);
+            }
         }
     }
 
@@ -211,7 +217,7 @@
      *
      * @param opcode the opcode
      * @param var    the variable index
-     * @see org.objectweb.asm.MethodAdapter#visitVarInsn(int, int)
+     * @see org.objectweb.asm.commons.GeneratorAdapter#visitVarInsn(int, int)
      */
     public void visitVarInsn(int opcode, int var) {
         if (var == 0) {
@@ -232,7 +238,7 @@
      *
      * @param var       the variable index
      * @param increment the increment
-     * @see org.objectweb.asm.MethodAdapter#visitIincInsn(int, int)
+     * @see org.objectweb.asm.commons.GeneratorAdapter#visitIincInsn(int, int)
      */
     public void visitIincInsn(int var, int increment) {
         if (var != 0) {
@@ -254,7 +260,7 @@
      * @param start     the beginning label
      * @param end       the ending label
      * @param index     the variable index
-     * @see org.objectweb.asm.MethodAdapter#visitLocalVariable(java.lang.String, java.lang.String, java.lang.String, org.objectweb.asm.Label, org.objectweb.asm.Label, int)
+     * @see org.objectweb.asm.commons.GeneratorAdapter#visitLocalVariable(java.lang.String, java.lang.String, java.lang.String, org.objectweb.asm.Label, org.objectweb.asm.Label, int)
      */
     public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) {
         if (index == 0) {
@@ -272,7 +278,7 @@
      *
      * @param maxStack  the stack size.
      * @param maxLocals the local variable count.
-     * @see org.objectweb.asm.MethodAdapter#visitMaxs(int, int)
+     * @see org.objectweb.asm.commons.GeneratorAdapter#visitMaxs(int, int)
      */
     public void visitMaxs(int maxStack, int maxLocals) {
         mv.visitMaxs(maxStack + 1, maxLocals + 2);
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassAdapter.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassAdapter.java
index b63f436..35c682c 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassAdapter.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassAdapter.java
@@ -23,7 +23,6 @@
 import org.objectweb.asm.commons.GeneratorAdapter;
 import org.objectweb.asm.tree.LocalVariableNode;
 
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -36,7 +35,7 @@
  *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class InnerClassAdapter extends ClassAdapter implements Opcodes {
+public class InnerClassAdapter extends ClassVisitor implements Opcodes {
 
     /**
      * The manipulator having manipulated the outer class.
@@ -67,13 +66,13 @@
      * Creates the inner class adapter.
      *
      * @param name      the inner class name (internal name)
-     * @param arg0       parent class visitor
+     * @param visitor       parent class visitor
      * @param outerClassName outer class (implementation class)
      * @param manipulator the manipulator having manipulated the outer class.
      */
-    public InnerClassAdapter(String name, ClassVisitor arg0, String outerClassName,
+    public InnerClassAdapter(String name, ClassVisitor visitor, String outerClassName,
                              Manipulator manipulator) {
-        super(arg0);
+        super(Opcodes.ASM5, visitor);
         m_name = name;
         m_simpleName = m_name.substring(m_name.indexOf("$") + 1);
         m_outer = outerClassName;
@@ -87,6 +86,7 @@
         // not set of set to true.
         int theVersion = version;
         String downgrade = System.getProperty("ipojo.downgrade.classes");
+        //TODO FRAME HACK HERE
         if ((downgrade == null  || "true".equals(downgrade))  && version == Opcodes.V1_7) {
             theVersion = Opcodes.V1_6;
         }
@@ -103,7 +103,8 @@
      * @param signature  method signature
      * @param exceptions list of exceptions thrown by the method
      * @return a code adapter manipulating field accesses
-     * @see org.objectweb.asm.ClassAdapter#visitMethod(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])
+     * @see org.objectweb.asm.ClassVisitor#visitMethod(int, java.lang.String, java.lang.String, java.lang.String,
+     * java.lang.String[])
      */
     public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
         // Do nothing on static methods, should not happen in non-static inner classes.
@@ -209,7 +210,7 @@
 
         // Compute result and exception stack location
         int result = -1;
-        int exception = -1;
+        int exception;
 
         //int arguments = mv.newLocal(Type.getType((new Object[0]).getClass()));
 
@@ -235,7 +236,7 @@
 
         mv.visitVarInsn(ALOAD, 0);
         mv.loadArgs();
-        mv.visitMethodInsn(INVOKESPECIAL, m_name, MethodCreator.PREFIX + name, desc);
+        mv.visitMethodInsn(INVOKESPECIAL, m_name, MethodCreator.PREFIX + name, desc, false);
         mv.visitInsn(returnType.getOpcode(IRETURN));
 
         // end of the non intercepted method invocation.
@@ -249,13 +250,13 @@
         mv.visitLdcInsn(getMethodId(name, desc));
         mv.loadArgArray();
         mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", MethodCreator.ENTRY,
-                "(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V");
+                "(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V", false);
 
         mv.visitVarInsn(ALOAD, 0);
 
         // Do not allow argument modification : just reload arguments.
         mv.loadArgs();
-        mv.visitMethodInsn(INVOKESPECIAL, m_name, MethodCreator.PREFIX + name, desc);
+        mv.visitMethodInsn(INVOKESPECIAL, m_name, MethodCreator.PREFIX + name, desc, false);
 
         if (returnType.getSort() != Type.VOID) {
             mv.visitVarInsn(returnType.getOpcode(ISTORE), result);
@@ -272,7 +273,8 @@
         } else {
             mv.visitInsn(ACONST_NULL);
         }
-        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", MethodCreator.EXIT, "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V");
+        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager",
+                MethodCreator.EXIT, "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V", false);
 
         mv.visitLabel(l1);
         Label l7 = new Label();
@@ -286,7 +288,8 @@
         mv.visitVarInsn(ALOAD, 0);
         mv.visitLdcInsn(getMethodId(name, desc));
         mv.visitVarInsn(ALOAD, exception);
-        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", MethodCreator.ERROR, "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Throwable;)V");
+        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", MethodCreator.ERROR,
+                "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Throwable;)V", false);
         mv.visitVarInsn(ALOAD, exception);
         mv.visitInsn(ATHROW);
 
@@ -305,20 +308,16 @@
 
         // Move annotations
         if (annotations != null) {
-            for (int i = 0; i < annotations.size(); i++) {
-                ClassChecker.AnnotationDescriptor ad = annotations.get(i);
+            for (ClassChecker.AnnotationDescriptor ad : annotations) {
                 ad.visitAnnotation(mv);
             }
         }
 
         // Move parameter annotations
         if (paramAnnotations != null  && ! paramAnnotations.isEmpty()) {
-            Iterator<Integer> ids = paramAnnotations.keySet().iterator();
-            while(ids.hasNext()) {
-                Integer id = ids.next();
+            for (Integer id : paramAnnotations.keySet()) {
                 List<ClassChecker.AnnotationDescriptor> ads = paramAnnotations.get(id);
-                for (int i = 0; i < ads.size(); i++) {
-                    ClassChecker.AnnotationDescriptor ad = ads.get(i);
+                for (ClassChecker.AnnotationDescriptor ad : ads) {
                     ad.visitParameterAnnotation(id, mv);
                 }
             }
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassChecker.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassChecker.java
index cd93eee..886dea2 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassChecker.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassChecker.java
@@ -19,22 +19,22 @@
 

 package org.apache.felix.ipojo.manipulation;

 

-import org.objectweb.asm.*;

-import org.objectweb.asm.commons.EmptyVisitor;

-

-import java.util.*;

+import org.objectweb.asm.ClassVisitor;

+import org.objectweb.asm.MethodVisitor;

+import org.objectweb.asm.Opcodes;

 

 /**

  * Analyze an inner class.

  * This visit collects the methods from the inner class.

  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>

  */

-public class InnerClassChecker extends EmptyVisitor implements ClassVisitor, Opcodes {

+public class InnerClassChecker extends ClassVisitor implements Opcodes {

 

     private final String m_name;

     private final Manipulator m_manipulator;

 

     public InnerClassChecker(String name, Manipulator manipulator) {

+        super(Opcodes.ASM5);

         m_name = name;

         m_manipulator = manipulator;

     }

diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
index ce1579d..6c931c2 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
@@ -117,17 +117,17 @@
     public byte[] manipulate(byte[] origin) throws IOException {
         if (!m_alreadyManipulated) {
             InputStream is2 = new ByteArrayInputStream(origin);
-            ClassReader cr0 = new ClassReader(is2);
-            ClassWriter cw0 = new ClassWriter(ClassWriter.COMPUTE_MAXS);
-            //CheckClassAdapter ch = new CheckClassAdapter(cw0);
-            MethodCreator process = new MethodCreator(cw0, this);
+            ClassReader reader = new ClassReader(is2);
+            ClassWriter writer = new ClassWriter(ClassWriter.COMPUTE_MAXS);
+            //CheckClassAdapter ch = new CheckClassAdapter(writer);
+            MethodCreator process = new MethodCreator(writer, this);
             if (m_version >= Opcodes.V1_6) {
-                cr0.accept(process, ClassReader.EXPAND_FRAMES);
+                reader.accept(process, ClassReader.EXPAND_FRAMES);
             } else {
-                cr0.accept(process, 0);
+                reader.accept(process, 0);
             }
             is2.close();
-            return cw0.toByteArray();
+            return writer.toByteArray();
         } else {
             return origin;
         }
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java
index a3a9786..5b24026 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java
@@ -53,7 +53,7 @@
      * @param fields : Contained fields

      */

     public MethodCodeAdapter(final MethodVisitor mv, final String owner, int access, String name, String desc, Set<String> fields) {

-        super(mv, access, name, desc);

+        super(Opcodes.ASM5, mv, access, name, desc);

         m_owner = owner;

         m_fields = fields;

     }

@@ -70,11 +70,11 @@
         if (owner.equals(m_owner) && m_fields.contains(name)) {

             if (opcode == GETFIELD) {

                 String gDesc = "()" + desc;

-                visitMethodInsn(INVOKEVIRTUAL, owner, "__get" + name, gDesc);

+                visitMethodInsn(INVOKEVIRTUAL, owner, "__get" + name, gDesc, false);

                 return;

             } else if (opcode == PUTFIELD) {

                 String sDesc = "(" + desc + ")V";

-                visitMethodInsn(INVOKEVIRTUAL, owner, "__set" + name, sDesc);

+                visitMethodInsn(INVOKEVIRTUAL, owner, "__set" + name, sDesc, false);

                 return;

             }

         }

@@ -90,14 +90,14 @@
      * @param visible the annotation visibility

      * @return the <code>null</code> if the annotation is visible, otherwise returns

      * {@link GeneratorAdapter#visitAnnotation(String, boolean)}

-     * @see org.objectweb.asm.MethodAdapter#visitAnnotation(java.lang.String, boolean)

+     * @see org.objectweb.asm.commons.GeneratorAdapter#visitAnnotation(java.lang.String, boolean)

      */

     public AnnotationVisitor visitAnnotation(String name, boolean visible) {

         // Annotations are moved to the injected constructor.

         if (visible) {

             return null;

         } else {

-            return super.visitAnnotation(name, visible);

+            return super.visitAnnotation(name, false);

         }

     }

 

@@ -108,14 +108,14 @@
      * @param visible if te annotation visibility

      * @return the <code>null</code> if the annotation is visible, otherwise returns

      * {@link GeneratorAdapter#visitAnnotation(String, boolean)}

-     * @see org.objectweb.asm.MethodAdapter#visitParameterAnnotation(int, java.lang.String, boolean)

+     * @see org.objectweb.asm.commons.GeneratorAdapter#visitParameterAnnotation(int, java.lang.String, boolean)

      */

     public AnnotationVisitor visitParameterAnnotation(int id, String name,

             boolean visible) {

         if (visible) {

             return null;

         } else {

-            return super.visitParameterAnnotation(id, name, visible);

+            return super.visitParameterAnnotation(id, name, false);

         }

     }

 

diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java
index cdb4ddf..11a6cc6 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java
@@ -22,7 +22,6 @@
 import java.util.*;

 

 import org.apache.felix.ipojo.manipulation.ClassChecker.AnnotationDescriptor;

-import org.objectweb.asm.ClassAdapter;

 import org.objectweb.asm.ClassVisitor;

 import org.objectweb.asm.FieldVisitor;

 import org.objectweb.asm.Label;

@@ -31,14 +30,13 @@
 import org.objectweb.asm.Type;

 import org.objectweb.asm.commons.GeneratorAdapter;

 import org.objectweb.asm.tree.LocalVariableNode;

-import org.objectweb.asm.tree.MethodNode;

 

 /**

  * iPOJO Class Adapter.

  * This class adapt the visited class to link the class with the container.

  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>

  */

-public class MethodCreator extends ClassAdapter implements Opcodes {

+public class MethodCreator extends ClassVisitor implements Opcodes {

 

     /**

      * Instance Manager Field.

@@ -139,11 +137,11 @@
 

     /**

      * Constructor.

-     * @param arg0 : class visitor.

+     * @param visitor : class visitor.

      * @param manipulator : the manipulator having analyzed the class.

      */

-    public MethodCreator(ClassVisitor arg0, Manipulator manipulator) {

-        super(arg0);

+    public MethodCreator(ClassVisitor visitor, Manipulator manipulator) {

+        super(Opcodes.ASM5, visitor);

         m_manipulator = manipulator;

         m_fields = manipulator.getFields().keySet();

         m_visitedMethods = manipulator.getMethods();

@@ -160,7 +158,8 @@
      * @param signature : signature

      * @param superName : parent class

      * @param interfaces : implemented interface

-     * @see org.objectweb.asm.ClassAdapter#visit(int, int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])

+     * @see org.objectweb.asm.ClassVisitor#visit(int, int, java.lang.String, java.lang.String, java.lang.String,

+     * java.lang.String[])

      */

     public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {

         m_owner = name;

@@ -182,7 +181,8 @@
      * @param signature : signature

      * @param exceptions : declared exceptions.

      * @return the MethodVisitor wich will visit the method code.

-     * @see org.objectweb.asm.ClassAdapter#visitMethod(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])

+     * @see org.objectweb.asm.ClassVisitor#visitMethod(int, java.lang.String, java.lang.String, java.lang.String,

+     * java.lang.String[])

      */

     public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {

         // Avoid manipulating special methods

@@ -281,11 +281,11 @@
 

             if (type.getSort() == Type.ARRAY) {

                 String gDesc = "()" + desc;

-                createArrayGetter(name, gDesc, type);

+                createArrayGetter(name, gDesc);

 

                 // Generates setter method

                 String sDesc = "(" + desc + ")V";

-                createArraySetter(name, sDesc, type);

+                createArraySetter(name, sDesc);

 

             } else {

                 // Generate the getter method

@@ -331,28 +331,24 @@
          mv.visitVarInsn(ALOAD, 0);

          mv.visitInsn(ACONST_NULL);

          mv.loadArgs();

-         mv.visitMethodInsn(INVOKESPECIAL, m_owner, "<init>", newDesc);

+         mv.visitMethodInsn(INVOKESPECIAL, m_owner, "<init>", newDesc, false);

          mv.visitInsn(RETURN);

          Label stop = new Label();

          mv.visitLabel(stop);

 

          // Move annotations

          if (annotations != null) {

-             for (int i = 0; i < annotations.size(); i++) {

-                 AnnotationDescriptor ad = annotations.get(i);

+             for (AnnotationDescriptor ad : annotations) {

                  ad.visitAnnotation(mv);

              }

          }

 

          // Move parameter annotations if any

          if (paramAnnotations != null  && ! paramAnnotations.isEmpty()) {

-             Iterator<Integer> ids = paramAnnotations.keySet().iterator();

-             while(ids.hasNext()) {

-                 Integer id = ids.next();

+             for (Integer id : paramAnnotations.keySet()) {

                  List<AnnotationDescriptor> ads = paramAnnotations.get(id);

-                 for (int i = 0; i < ads.size(); i++) {

-                     AnnotationDescriptor ad = ads.get(i);

-                     ad.visitParameterAnnotation(id.intValue(), mv);

+                 for (AnnotationDescriptor ad : ads) {

+                     ad.visitParameterAnnotation(id, mv);

                  }

              }

          }

@@ -404,7 +400,7 @@
 

         // Compute result and exception stack location

         int result = -1;

-        int exception = -1;

+        int exception;

 

         //int arguments = mv.newLocal(Type.getType((new Object[0]).getClass()));

 

@@ -428,7 +424,7 @@
 

         mv.visitVarInsn(ALOAD, 0);

         mv.loadArgs();

-        mv.visitMethodInsn(INVOKESPECIAL, m_owner, PREFIX + name, desc);

+        mv.visitMethodInsn(INVOKESPECIAL, m_owner, PREFIX + name, desc, false);

         mv.visitInsn(returnType.getOpcode(IRETURN));

 

         // end of the non intercepted method invocation.

@@ -440,13 +436,14 @@
         mv.visitVarInsn(ALOAD, 0);

         mv.visitLdcInsn(generateMethodId(name, desc));

         mv.loadArgArray();

-        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", ENTRY, "(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V");

+        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", ENTRY,

+                "(Ljava/lang/Object;Ljava/lang/String;[Ljava/lang/Object;)V", false);

 

         mv.visitVarInsn(ALOAD, 0);

 

         // Do not allow argument modification : just reload arguments.

         mv.loadArgs();

-        mv.visitMethodInsn(INVOKESPECIAL, m_owner, PREFIX + name, desc);

+        mv.visitMethodInsn(INVOKESPECIAL, m_owner, PREFIX + name, desc, false);

 

         if (returnType.getSort() != Type.VOID) {

             mv.visitVarInsn(returnType.getOpcode(ISTORE), result);

@@ -462,7 +459,8 @@
         } else {

             mv.visitInsn(ACONST_NULL);

         }

-        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", EXIT, "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V");

+        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", EXIT,

+                "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V", false);

 

         mv.visitLabel(l1);

         Label l7 = new Label();

@@ -475,7 +473,8 @@
         mv.visitVarInsn(ALOAD, 0);

         mv.visitLdcInsn(generateMethodId(name, desc));

         mv.visitVarInsn(ALOAD, exception);

-        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", ERROR, "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Throwable;)V");

+        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", ERROR,

+                "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Throwable;)V", false);

         mv.visitVarInsn(ALOAD, exception);

         mv.visitInsn(ATHROW);

 

@@ -494,21 +493,17 @@
 

         // Move annotations

         if (annotations != null) {

-            for (int i = 0; i < annotations.size(); i++) {

-                AnnotationDescriptor ad = annotations.get(i);

+            for (AnnotationDescriptor ad : annotations) {

                 ad.visitAnnotation(mv);

             }

         }

 

         // Move parameter annotations

         if (paramAnnotations != null  && ! paramAnnotations.isEmpty()) {

-            Iterator<Integer> ids = paramAnnotations.keySet().iterator();

-            while(ids.hasNext()) {

-                Integer id = ids.next();

+            for (Integer id : paramAnnotations.keySet()) {

                 List<AnnotationDescriptor> ads = paramAnnotations.get(id);

-                for (int i = 0; i < ads.size(); i++) {

-                    AnnotationDescriptor ad = ads.get(i);

-                    ad.visitParameterAnnotation(id.intValue(), mv);

+                for (AnnotationDescriptor ad : ads) {

+                    ad.visitParameterAnnotation(id, mv);

                 }

             }

         }

@@ -638,17 +633,15 @@
         // Add the POJO interface to the interface list

         // Check that the POJO interface is not already in the list

         boolean found = false;

-        for (int i = 0; i < interfaces.length; i++) {

-            if (interfaces[i].equals(POJO)) {

+        for (String anInterface : interfaces) {

+            if (anInterface.equals(POJO)) {

                 found = true;

             }

         }

         String[] itfs;

         if (!found) {

             itfs = new String[interfaces.length + 1];

-            for (int i = 0; i < interfaces.length; i++) {

-                itfs[i] = interfaces[i];

-            }

+            System.arraycopy(interfaces, 0, itfs, 0, interfaces.length);

             itfs[interfaces.length] = POJO;

         } else {

             itfs = interfaces;

@@ -657,6 +650,7 @@
         // If version = 1.7, use 1.6 if the ipojo.downgrade.classes system property is either

         // not set of set to true.

         int theVersion = version;

+        //TODO HACK HERE !!!!

         String downgrade = System.getProperty("ipojo.downgrade.classes");

         if ((downgrade == null  || "true".equals(downgrade))  && version == Opcodes.V1_7) {

             theVersion = Opcodes.V1_6;

@@ -668,7 +662,7 @@
     /**

      * Visit end.

      * Create helper methods.

-     * @see org.objectweb.asm.ClassAdapter#visitEnd()

+     * @see org.objectweb.asm.ClassVisitor#visitEnd()

      */

     public void visitEnd() {

         // Create the component manager setter method

@@ -700,13 +694,13 @@
 

         // Super call

         mv.visitVarInsn(ALOAD, 0);

-        mv.visitMethodInsn(INVOKESPECIAL, m_superclass, "<init>", "()V");

+        mv.visitMethodInsn(INVOKESPECIAL, m_superclass, "<init>", "()V", false);

 

         // Call set instance manager

         mv.visitVarInsn(ALOAD, 0);

         mv.visitVarInsn(ALOAD, 1);

         mv.visitMethodInsn(INVOKEVIRTUAL, m_owner, "_setInstanceManager",

-                "(Lorg/apache/felix/ipojo/InstanceManager;)V");

+                "(Lorg/apache/felix/ipojo/InstanceManager;)V", false);

 

         mv.visitInsn(RETURN);

         mv.visitMaxs(0, 0);

@@ -733,18 +727,17 @@
 

         mv.visitVarInsn(ALOAD, 0);

         mv.visitFieldInsn(GETFIELD, m_owner, IM_FIELD, "Lorg/apache/felix/ipojo/InstanceManager;");

-        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", "getRegistredFields", "()Ljava/util/Set;");

+        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", "getRegistredFields",

+                "()Ljava/util/Set;", false);

         mv.visitVarInsn(ASTORE, 2);

 

         mv.visitVarInsn(ALOAD, 2);

         Label endif = new Label();

         mv.visitJumpInsn(IFNULL, endif);

-        Iterator<String> it = m_fields.iterator();

-        while (it.hasNext()) {

-            String field = it.next();

+        for (String field : m_fields) {

             mv.visitVarInsn(ALOAD, 2);

             mv.visitLdcInsn(field);

-            mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Set", "contains", "(Ljava/lang/Object;)Z");

+            mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Set", "contains", "(Ljava/lang/Object;)Z", true);

             Label l3 = new Label();

             mv.visitJumpInsn(IFEQ, l3);

             mv.visitVarInsn(ALOAD, 0);

@@ -756,19 +749,19 @@
 

         mv.visitVarInsn(ALOAD, 0);

         mv.visitFieldInsn(GETFIELD, m_owner, IM_FIELD, "Lorg/apache/felix/ipojo/InstanceManager;");

-        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", "getRegistredMethods", "()Ljava/util/Set;");

+        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", "getRegistredMethods",

+                "()Ljava/util/Set;", false);

         mv.visitVarInsn(ASTORE, 2);

 

         mv.visitVarInsn(ALOAD, 2);

         Label endif2 = new Label();

         mv.visitJumpInsn(IFNULL, endif2);

 

-        for (int i = 0; i < m_methods.size(); i++) {

-            String methodId = m_methods.get(i);

+        for (String methodId : m_methods) {

             if (!methodId.equals("<init>")) {

                 mv.visitVarInsn(ALOAD, 2);

                 mv.visitLdcInsn(methodId);

-                mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Set", "contains", "(Ljava/lang/Object;)Z");

+                mv.visitMethodInsn(INVOKEINTERFACE, "java/util/Set", "contains", "(Ljava/lang/Object;)Z", true);

                 Label l3 = new Label();

                 mv.visitJumpInsn(IFEQ, l3);

                 mv.visitVarInsn(ALOAD, 0);

@@ -802,9 +795,8 @@
      * Create a getter method for an array.

      * @param name : field name

      * @param desc : method description

-     * @param type : contained type (inside the array)

      */

-    private void createArraySetter(String name, String desc, Type type) {

+    private void createArraySetter(String name, String desc) {

         MethodVisitor mv = cv.visitMethod(0, "__set" + name, desc, null, null);

         mv.visitCode();

 

@@ -829,7 +821,8 @@
         mv.visitVarInsn(ALOAD, 0);

         mv.visitLdcInsn(name);

         mv.visitVarInsn(ALOAD, 1);

-        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", SET, "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V");

+        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", SET,

+                "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V", false);

 

         mv.visitInsn(RETURN);

 

@@ -842,9 +835,8 @@
      * Create a setter method for an array.

      * @param name : field name

      * @param desc : method description

-     * @param type : contained type (inside the array)

      */

-    private void createArrayGetter(String name, String desc, Type type) {

+    private void createArrayGetter(String name, String desc) {

         String methodName = "__get" + name;

         MethodVisitor mv = cv.visitMethod(0, methodName, desc, null, null);

         mv.visitCode();

@@ -864,7 +856,8 @@
         mv.visitFieldInsn(GETFIELD, m_owner, IM_FIELD, "Lorg/apache/felix/ipojo/InstanceManager;");

         mv.visitVarInsn(ALOAD, 0);

         mv.visitLdcInsn(name);

-        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", GET, "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;");

+        mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", GET,

+                "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);

         mv.visitTypeInsn(CHECKCAST, internalType);

         mv.visitInsn(ARETURN);

 

@@ -912,7 +905,8 @@
                 mv.visitFieldInsn(GETFIELD, m_owner, IM_FIELD, "Lorg/apache/felix/ipojo/InstanceManager;");

                 mv.visitVarInsn(ALOAD, 0);

                 mv.visitLdcInsn(name);

-                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", GET, "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;");

+                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager",

+                        GET, "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);

                 mv.visitVarInsn(ASTORE, 1);

 

                 mv.visitVarInsn(ALOAD, 1);

@@ -920,7 +914,7 @@
                 mv.visitVarInsn(ASTORE, 2);

 

                 mv.visitVarInsn(ALOAD, 2);

-                mv.visitMethodInsn(INVOKEVIRTUAL, boxingType, unboxingMethod, "()" + internalName);

+                mv.visitMethodInsn(INVOKEVIRTUAL, boxingType, unboxingMethod, "()" + internalName, false);

                 mv.visitInsn(type.getOpcode(IRETURN));

                 break;

 

@@ -944,7 +938,8 @@
                 mv.visitFieldInsn(GETFIELD, m_owner, IM_FIELD, "Lorg/apache/felix/ipojo/InstanceManager;");

                 mv.visitVarInsn(ALOAD, 0);

                 mv.visitLdcInsn(name);

-                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", GET, "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;");

+                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager",

+                        GET, "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);

                 mv.visitVarInsn(ASTORE, 1);

 

                 mv.visitVarInsn(ALOAD, 1);

@@ -952,7 +947,7 @@
                 mv.visitVarInsn(ASTORE, 2);

 

                 mv.visitVarInsn(ALOAD, 2);

-                mv.visitMethodInsn(INVOKEVIRTUAL, boxingType, unboxingMethod, "()" + internalName);

+                mv.visitMethodInsn(INVOKEVIRTUAL, boxingType, unboxingMethod, "()" + internalName, false);

                 mv.visitInsn(LRETURN);

 

                 break;

@@ -977,7 +972,8 @@
                 mv.visitFieldInsn(GETFIELD, m_owner, IM_FIELD, "Lorg/apache/felix/ipojo/InstanceManager;");

                 mv.visitVarInsn(ALOAD, 0);

                 mv.visitLdcInsn(name);

-                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", GET, "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;");

+                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager",

+                        GET, "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);

                 mv.visitVarInsn(ASTORE, 1);

 

                 mv.visitVarInsn(ALOAD, 1);

@@ -985,7 +981,7 @@
                 mv.visitVarInsn(ASTORE, 2);

 

                 mv.visitVarInsn(ALOAD, 2);

-                mv.visitMethodInsn(INVOKEVIRTUAL, boxingType, unboxingMethod, "()" + internalName);

+                mv.visitMethodInsn(INVOKEVIRTUAL, boxingType, unboxingMethod, "()" + internalName, false);

                 mv.visitInsn(DRETURN);

 

                 break;

@@ -1010,7 +1006,8 @@
                 mv.visitFieldInsn(GETFIELD, m_owner, IM_FIELD, "Lorg/apache/felix/ipojo/InstanceManager;");

                 mv.visitVarInsn(ALOAD, 0);

                 mv.visitLdcInsn(name);

-                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", GET, "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;");

+                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager",

+                        GET, "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);

                 mv.visitVarInsn(ASTORE, 1);

 

                 mv.visitVarInsn(ALOAD, 1);

@@ -1018,7 +1015,7 @@
                 mv.visitVarInsn(ASTORE, 2);

 

                 mv.visitVarInsn(ALOAD, 2);

-                mv.visitMethodInsn(INVOKEVIRTUAL, boxingType, unboxingMethod, "()" + internalName);

+                mv.visitMethodInsn(INVOKEVIRTUAL, boxingType, unboxingMethod, "()" + internalName, false);

                 mv.visitInsn(FRETURN);

 

                 break;

@@ -1039,7 +1036,8 @@
                 mv.visitFieldInsn(GETFIELD, m_owner, IM_FIELD, "Lorg/apache/felix/ipojo/InstanceManager;");

                 mv.visitVarInsn(ALOAD, 0);

                 mv.visitLdcInsn(name);

-                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", GET, "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;");

+                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager",

+                        GET, "(Ljava/lang/Object;Ljava/lang/String;)Ljava/lang/Object;", false);

                 mv.visitTypeInsn(CHECKCAST, type.getInternalName());

                 mv.visitInsn(ARETURN);

 

@@ -1091,7 +1089,7 @@
                 mv.visitTypeInsn(NEW, boxingType);

                 mv.visitInsn(DUP);

                 mv.visitVarInsn(type.getOpcode(ILOAD), 1);

-                mv.visitMethodInsn(INVOKESPECIAL, boxingType, "<init>", "(" + internalName + ")V");

+                mv.visitMethodInsn(INVOKESPECIAL, boxingType, "<init>", "(" + internalName + ")V", false);

                 mv.visitVarInsn(ASTORE, 2);

 

                 Label l2 = new Label();

@@ -1101,7 +1099,8 @@
                 mv.visitVarInsn(ALOAD, 0);

                 mv.visitLdcInsn(name);

                 mv.visitVarInsn(ALOAD, 2);

-                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", SET, "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V");

+                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", SET,

+                        "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V", false);

 

                 Label l3 = new Label();

                 mv.visitLabel(l3);

@@ -1130,7 +1129,7 @@
                 mv.visitTypeInsn(NEW, boxingType);

                 mv.visitInsn(DUP);

                 mv.visitVarInsn(type.getOpcode(ILOAD), 1);

-                mv.visitMethodInsn(INVOKESPECIAL, boxingType, "<init>", "(" + internalName + ")V");

+                mv.visitMethodInsn(INVOKESPECIAL, boxingType, "<init>", "(" + internalName + ")V", false);

                 mv.visitVarInsn(ASTORE, 3); // Double space

 

                 l2 = new Label();

@@ -1140,7 +1139,8 @@
                 mv.visitVarInsn(ALOAD, 0);

                 mv.visitLdcInsn(name);

                 mv.visitVarInsn(ALOAD, 3);

-                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", SET, "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V");

+                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager",

+                        SET, "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V", false);

 

                 l3 = new Label();

                 mv.visitLabel(l3);

@@ -1164,7 +1164,8 @@
                 mv.visitVarInsn(ALOAD, 0);

                 mv.visitLdcInsn(name);

                 mv.visitVarInsn(ALOAD, 1);

-                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", SET, "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V");

+                mv.visitMethodInsn(INVOKEVIRTUAL, "org/apache/felix/ipojo/InstanceManager", SET,

+                        "(Ljava/lang/Object;Ljava/lang/String;Ljava/lang/Object;)V", false);

 

                 mv.visitInsn(RETURN);

                 break;

diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/ClassMetadataCollector.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/ClassMetadataCollector.java
index 47e65e1..2cf3c3e 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/ClassMetadataCollector.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/ClassMetadataCollector.java
@@ -23,11 +23,7 @@
 import org.apache.felix.ipojo.manipulator.metadata.annotation.registry.BindingRegistry;
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
-import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.FieldVisitor;
-import org.objectweb.asm.MethodVisitor;
-import org.objectweb.asm.Opcodes;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.*;
 import org.objectweb.asm.tree.ClassNode;
 import org.objectweb.asm.tree.FieldNode;
 import org.objectweb.asm.tree.MethodNode;
@@ -35,7 +31,7 @@
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class ClassMetadataCollector extends EmptyVisitor {
+public class ClassMetadataCollector extends ClassVisitor {
 
     /**
      * Binding's registry.
@@ -62,6 +58,7 @@
     private Element instanceMetadata;
 
     public ClassMetadataCollector(BindingRegistry registry, Reporter reporter) {
+        super(Opcodes.ASM5);
         this.registry = registry;
         this.reporter = reporter;
         node = new ClassNode();
@@ -69,6 +66,7 @@
 
     /**
      * Build metadata. May be {@literal null} if no "component type" was found.
+     *
      * @return Build metadata. May be {@literal null} if no "component type" was found.
      */
     public Element getComponentMetadata() {
@@ -77,6 +75,7 @@
 
     /**
      * Build instance metadata. May be {@literal null} if no "component type" was found.
+     *
      * @return Build metadata. May be {@literal null} if no "component type" was found.
      */
     public Element getInstanceMetadata() {
@@ -92,10 +91,11 @@
     /**
      * Visit class annotations.
      * This method detects @component and @provides annotations.
-     * @param desc : annotation descriptor.
+     *
+     * @param desc    : annotation descriptor.
      * @param visible : is the annotation visible at runtime.
      * @return the annotation visitor.
-     * @see org.objectweb.asm.ClassAdapter#visitAnnotation(java.lang.String, boolean)
+     * @see org.objectweb.asm.ClassVisitor#visitAnnotation(java.lang.String, boolean)
      */
     public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
 
@@ -110,13 +110,15 @@
     /**
      * Visit a field.
      * Call the field collector visitor.
-     * @param access : field access.
-     * @param name : field name
-     * @param desc : field descriptor
+     *
+     * @param access    : field access.
+     * @param name      : field name
+     * @param desc      : field descriptor
      * @param signature : field signature
-     * @param value : field value (static field only)
+     * @param value     : field value (static field only)
      * @return the field visitor.
-     * @see org.objectweb.asm.ClassAdapter#visitField(int, java.lang.String, java.lang.String, java.lang.String, java.lang.Object)
+     * @see org.objectweb.asm.ClassVisitor#visitField(int, java.lang.String, java.lang.String, java.lang.String,
+     * java.lang.Object)
      */
     public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) {
         return new FieldMetadataCollector(workbench, new FieldNode(access, name, desc, signature, value));
@@ -125,13 +127,14 @@
     /**
      * Visit a method.
      * Call the method collector visitor.
-     * @param access : method access
-     * @param name : method name
-     * @param desc : method descriptor
-     * @param signature : method signature
+     *
+     * @param access     : method access
+     * @param name       : method name
+     * @param desc       : method descriptor
+     * @param signature  : method signature
      * @param exceptions : method exceptions
      * @return the Method Visitor.
-     * @see org.objectweb.asm.ClassAdapter#visitMethod(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])
+     * @see org.objectweb.asm.ClassVisitor#visitMethod(int, java.lang.String, java.lang.String, java.lang.String, java.lang.String[])
      */
     public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
         return new MethodMetadataCollector(workbench, new MethodNode(access, name, desc, signature, exceptions), reporter);
@@ -139,7 +142,8 @@
 
     /**
      * End of the visit : compute final elements.
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitEnd()
+     *
+     * @see org.objectweb.asm.ClassVisitor#visitEnd()
      */
     @Override
     public void visitEnd() {
@@ -153,8 +157,9 @@
                     // That means that there is a missing 'component type' annotation
 
                     reporter.warn("Class %s has not been marked as a component type (no @Component, @Handler, " +
-                                          "...). It will be ignored by the iPOJO manipulator.",
-                                  workbench.getType().getClassName());
+                                    "...). It will be ignored by the iPOJO manipulator.",
+                            workbench.getType().getClassName()
+                    );
                     return;
                 } // else: no root and no elements
                 return;
@@ -165,7 +170,7 @@
 
             // If we have an instance declared and the component metadata has a name, we update the component's attribute
             // of the instance (https://issues.apache.org/jira/browse/FELIX-4052).
-            if (componentMetadata != null  && componentMetadata.containsAttribute("name")  && instanceMetadata != null) {
+            if (componentMetadata != null && componentMetadata.containsAttribute("name") && instanceMetadata != null) {
                 // Update the component attribute
                 instanceMetadata.addAttribute(new Attribute("component", componentMetadata.getAttribute("name")));
             }
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/FieldMetadataCollector.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/FieldMetadataCollector.java
index 09b08ed..638f778 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/FieldMetadataCollector.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/FieldMetadataCollector.java
@@ -22,13 +22,13 @@
 import org.apache.felix.ipojo.manipulator.metadata.annotation.registry.BindingRegistry;
 import org.objectweb.asm.AnnotationVisitor;
 import org.objectweb.asm.FieldVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.tree.FieldNode;
 
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class FieldMetadataCollector extends EmptyVisitor implements FieldVisitor {
+public class FieldMetadataCollector extends FieldVisitor {
 
     /**
      * Binding's registry.
@@ -46,6 +46,7 @@
     private FieldNode node;
 
     public FieldMetadataCollector(ComponentWorkbench workbench, FieldNode node) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
         this.node = node;
         this.registry = workbench.getBindingRegistry();
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/MethodMetadataCollector.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/MethodMetadataCollector.java
index 9ca9db9..556ba2a 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/MethodMetadataCollector.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/MethodMetadataCollector.java
@@ -23,13 +23,13 @@
 import org.apache.felix.ipojo.manipulator.metadata.annotation.registry.BindingRegistry;
 import org.objectweb.asm.AnnotationVisitor;
 import org.objectweb.asm.MethodVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.tree.MethodNode;
 
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class MethodMetadataCollector extends EmptyVisitor implements MethodVisitor {
+public class MethodMetadataCollector extends MethodVisitor {
 
     /**
      * Binding's registry.
@@ -37,11 +37,6 @@
     private BindingRegistry registry;
 
     /**
-     * Output informations.
-     */
-    private Reporter reporter;
-
-    /**
      * The workbench currently in use.
      */
     private ComponentWorkbench workbench;
@@ -52,8 +47,8 @@
     private MethodNode node;
 
     public MethodMetadataCollector(ComponentWorkbench workbench, MethodNode node, Reporter reporter) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
-        this.reporter = reporter;
         this.node = node;
         this.registry = workbench.getBindingRegistry();
     }
@@ -61,13 +56,12 @@
     /**
      * Visit method annotations.
      *
-     * @param desc : annotation name.
+     * @param desc    : annotation name.
      * @param visible : is the annotation visible at runtime.
      * @return the visitor paring the visited annotation.
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitAnnotation(java.lang.String, boolean)
+     * @see org.objectweb.asm.MethodVisitor#visitAnnotation(java.lang.String, boolean)
      */
     public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
-
         // Return the visitor to be executed (may be null)
         return registry.selection(workbench)
                 .method(this, node)
@@ -79,7 +73,7 @@
     /**
      * Visit a parameter annotation.
      *
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitParameterAnnotation(int, java.lang.String, boolean)
+     * @see org.objectweb.asm.MethodVisitor#visitParameterAnnotation(int, java.lang.String, boolean)
      */
     public AnnotationVisitor visitParameterAnnotation(int index,
                                                       String desc,
@@ -98,5 +92,4 @@
     }
 
 
-
 }
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/discovery/HandlerBindingDiscovery.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/discovery/HandlerBindingDiscovery.java
index 224f423..7c2249f 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/discovery/HandlerBindingDiscovery.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/discovery/HandlerBindingDiscovery.java
@@ -22,15 +22,14 @@
 import org.apache.felix.ipojo.annotations.HandlerBinding;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.model.AnnotationDiscovery;
 import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.Type;
-import org.objectweb.asm.commons.EmptyVisitor;
 
 /**
- * User: guillaume
- * Date: 09/07/13
- * Time: 14:52
+ * The annotation visitor responsible for parsing the {@link org.apache.felix.ipojo.annotations.HandlerBinding}
+ * annotation.
  */
-public class HandlerBindingDiscovery extends EmptyVisitor implements AnnotationDiscovery {
+public class HandlerBindingDiscovery extends AnnotationVisitor implements AnnotationDiscovery {
 
     public static final String HANDLER_BINDING_DESCRIPTOR = Type.getType(HandlerBinding.class).getDescriptor();
 
@@ -38,6 +37,13 @@
     private String m_value = null;
     private String m_namespace = null;
 
+    /**
+     * Constructs a new {@link org.objectweb.asm.AnnotationVisitor}.
+     */
+    public HandlerBindingDiscovery() {
+        super(Opcodes.ASM5);
+    }
+
     public AnnotationVisitor visitAnnotation(final String desc) {
         if (HANDLER_BINDING_DESCRIPTOR.equals(desc)) {
             m_handlerBinding = true;
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/parser/AnnotationTypeVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/parser/AnnotationTypeVisitor.java
index 77e9c53..e0b4e58 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/parser/AnnotationTypeVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/parser/AnnotationTypeVisitor.java
@@ -23,18 +23,20 @@
 import org.apache.felix.ipojo.manipulator.metadata.annotation.model.parser.replay.AnnotationVisitorPlayback;
 import org.objectweb.asm.AnnotationVisitor;
 import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.Type;
-import org.objectweb.asm.commons.EmptyVisitor;
 
 /**
- * User: guillaume
- * Date: 01/07/13
- * Time: 15:59
+ *
  */
-public class AnnotationTypeVisitor extends EmptyVisitor implements ClassVisitor {
+public class AnnotationTypeVisitor extends ClassVisitor {
 
     private AnnotationType annotationType;
 
+    public AnnotationTypeVisitor() {
+        super(Opcodes.ASM5);
+    }
+
     @Override
     public void visit(final int version, final int access, final String name, final String signature, final String superName, final String[] interfaces) {
         annotationType = new AnnotationType(Type.getObjectType(name));
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/parser/replay/AnnotationRecorder.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/parser/replay/AnnotationRecorder.java
index 47d1071..cb0e812 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/parser/replay/AnnotationRecorder.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/parser/replay/AnnotationRecorder.java
@@ -19,20 +19,23 @@
 
 package org.apache.felix.ipojo.manipulator.metadata.annotation.model.parser.replay;
 
+import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.Opcodes;
+
 import java.util.ArrayList;
 import java.util.List;
 
-import org.objectweb.asm.AnnotationVisitor;
-
 /**
-* User: guillaume
-* Date: 30/05/13
-* Time: 17:22
-*/
-public class AnnotationRecorder implements AnnotationVisitor, Replay {
+ * Record annotation to be replayed later.
+ */
+public class AnnotationRecorder extends AnnotationVisitor implements Replay {
 
     private List<Replay> m_replays = new ArrayList<Replay>();
 
+    public AnnotationRecorder() {
+        super(Opcodes.ASM5);
+    }
+
     public void visit(final String name, final Object value) {
         m_replays.add(new Visit(name, value));
     }
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/module/DefaultBindingModule.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/module/DefaultBindingModule.java
index 8d9833a..5c7af53 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/module/DefaultBindingModule.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/module/DefaultBindingModule.java
@@ -22,24 +22,10 @@
 import org.apache.felix.ipojo.annotations.*;
 import org.apache.felix.ipojo.manipulator.Reporter;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.ComponentWorkbench;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.ComponentVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.ControllerVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.FieldPropertyVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.HandlerDeclarationVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.HandlerVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.InstantiateVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.LifecycleVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.MethodPropertyVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.ParameterPropertyVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.PostRegistrationVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.ProvidesVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.RequiresVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.ServiceControllerVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.UpdatedVisitor;
+import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.*;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.bind.Action;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.bind.MethodBindVisitor;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.bind.ParameterBindVisitor;
-import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.generic.GenericVisitor;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.generic.GenericVisitorFactory;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.util.Elements;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.util.Names;
@@ -48,7 +34,6 @@
 import org.apache.felix.ipojo.manipulator.spi.BindingContext;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.tree.FieldNode;
 import org.objectweb.asm.tree.MethodNode;
 
 import javax.xml.parsers.DocumentBuilder;
@@ -113,7 +98,7 @@
                 .when(on(ElementType.FIELD))
                 .to(new AnnotationVisitorFactory() {
                     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                        return new RequiresVisitor(context.getWorkbench(), ((FieldNode) context.getNode()).name);
+                        return new RequiresVisitor(context.getWorkbench(), context.getFieldNode().name);
                     }
                 })
                 .when(on(ElementType.PARAMETER))
@@ -126,14 +111,14 @@
         bind(Controller.class)
                 .to(new AnnotationVisitorFactory() {
                     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                        return new ControllerVisitor(context.getWorkbench(), ((FieldNode) context.getNode()).name);
+                        return new ControllerVisitor(context.getWorkbench(), context.getFieldNode().name);
                     }
                 });
 
         bind(ServiceProperty.class)
                 .to(new AnnotationVisitorFactory() {
                     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                        String name = ((FieldNode) context.getNode()).name;
+                        String name = context.getFieldNode().name;
                         ComponentWorkbench workbench = context.getWorkbench();
 
                         if (!workbench.getIds().containsKey("provides")) {
@@ -152,7 +137,7 @@
         bind(ServiceController.class)
                 .to(new AnnotationVisitorFactory() {
                     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                        String name = ((FieldNode) context.getNode()).name;
+                        String name = context.getFieldNode().name;
                         ComponentWorkbench workbench = context.getWorkbench();
 
                         if (!workbench.getIds().containsKey("provides")) { // The provides annotation is already computed.
@@ -174,7 +159,7 @@
 
                         ComponentWorkbench workbench = context.getWorkbench();
                         Element properties = Elements.getPropertiesElement(workbench);
-                        String name = ((FieldNode) context.getNode()).name;
+                        String name = context.getFieldNode().name;
                         return new FieldPropertyVisitor(name, properties);
                     }
 
@@ -186,7 +171,7 @@
                         ComponentWorkbench workbench = context.getWorkbench();
                         // @Property on method parameter
                         Element properties = Elements.getPropertiesElement(workbench);
-                        String name = ((MethodNode) context.getNode()).name;
+                        String name = context.getMethodNode().name;
                         return new MethodPropertyVisitor(properties, name);
                     }
                 })
@@ -197,7 +182,7 @@
                         ComponentWorkbench workbench = context.getWorkbench();
                         // @Property on method parameter
                         Element properties = Elements.getPropertiesElement(workbench);
-                        MethodNode method = (MethodNode) context.getNode();
+                        MethodNode method = context.getMethodNode();
                         return new ParameterPropertyVisitor(properties, method, context.getParameterIndex());
                     }
                 });
@@ -205,7 +190,7 @@
         bind(Validate.class)
                 .to(new AnnotationVisitorFactory() {
                     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                        MethodNode node = (MethodNode) context.getNode();
+                        MethodNode node = context.getMethodNode();
                         return new LifecycleVisitor(context.getWorkbench(),
                                 Names.computeEffectiveMethodName(node.name),
                                 LifecycleVisitor.Transition.VALIDATE);
@@ -215,7 +200,7 @@
         bind(Invalidate.class)
                 .to(new AnnotationVisitorFactory() {
                     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                        MethodNode node = (MethodNode) context.getNode();
+                        MethodNode node = context.getMethodNode();
                         return new LifecycleVisitor(context.getWorkbench(),
                                 Names.computeEffectiveMethodName(node.name),
                                 LifecycleVisitor.Transition.INVALIDATE);
@@ -225,7 +210,7 @@
         bind(Updated.class)
                 .to(new AnnotationVisitorFactory() {
                     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                        MethodNode node = (MethodNode) context.getNode();
+                        MethodNode node = context.getMethodNode();
                         return new UpdatedVisitor(context.getWorkbench(),
                                 Names.computeEffectiveMethodName(node.name));
                     }
@@ -234,7 +219,7 @@
         bind(Bind.class)
                 .to(new AnnotationVisitorFactory() {
                     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                        MethodNode node = (MethodNode) context.getNode();
+                        MethodNode node = context.getMethodNode();
                         return new MethodBindVisitor(context.getWorkbench(), Action.BIND, node, context.getReporter());
                     }
                 });
@@ -242,7 +227,7 @@
         bind(Unbind.class)
                 .to(new AnnotationVisitorFactory() {
                     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                        MethodNode node = (MethodNode) context.getNode();
+                        MethodNode node = context.getMethodNode();
                         return new MethodBindVisitor(context.getWorkbench(), Action.UNBIND, node, context.getReporter());
                     }
                 });
@@ -250,7 +235,7 @@
         bind(Modified.class)
                 .to(new AnnotationVisitorFactory() {
                     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                        MethodNode node = (MethodNode) context.getNode();
+                        MethodNode node = context.getMethodNode();
                         return new MethodBindVisitor(context.getWorkbench(), Action.MODIFIED, node, context.getReporter());
                     }
                 });
@@ -258,7 +243,7 @@
         bind(PostRegistration.class)
                 .to(new AnnotationVisitorFactory() {
                     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                        MethodNode node = (MethodNode) context.getNode();
+                        MethodNode node = context.getMethodNode();
                         return new PostRegistrationVisitor(context.getWorkbench(), node.name);
                     }
                 });
@@ -266,7 +251,7 @@
         bind(PostUnregistration.class)
                 .to(new AnnotationVisitorFactory() {
                     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                        MethodNode node = (MethodNode) context.getNode();
+                        MethodNode node = context.getMethodNode();
                         return new PostRegistrationVisitor(context.getWorkbench(), node.name);
                     }
                 });
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/LegacyGenericBindingRegistry.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/LegacyGenericBindingRegistry.java
index 2f9c711..0c7d59e 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/LegacyGenericBindingRegistry.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/LegacyGenericBindingRegistry.java
@@ -19,13 +19,6 @@
 
 package org.apache.felix.ipojo.manipulator.metadata.annotation.registry;
 
-import static java.util.Collections.emptyList;
-import static java.util.Collections.singletonList;
-import static org.apache.felix.ipojo.manipulator.spi.helper.Predicates.alwaysTrue;
-
-import java.util.List;
-import java.util.regex.Pattern;
-
 import org.apache.felix.ipojo.manipulator.Reporter;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.generic.FieldGenericVisitor;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.generic.MethodGenericVisitor;
@@ -36,9 +29,13 @@
 import org.apache.felix.ipojo.manipulator.spi.BindingContext;
 import org.objectweb.asm.AnnotationVisitor;
 import org.objectweb.asm.Type;
-import org.objectweb.asm.tree.ClassNode;
-import org.objectweb.asm.tree.FieldNode;
-import org.objectweb.asm.tree.MethodNode;
+
+import java.util.List;
+import java.util.regex.Pattern;
+
+import static java.util.Collections.emptyList;
+import static java.util.Collections.singletonList;
+import static org.apache.felix.ipojo.manipulator.spi.helper.Predicates.alwaysTrue;
 
 /**
  * User: guillaume
@@ -61,25 +58,25 @@
             binding.setFactory(new AnnotationVisitorFactory() {
                 // Need to build a new Element instance for each created visitor
                 public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-                    if (context.getNode() instanceof ClassNode) {
+                    if (context.getClassNode() != null) {
                         return new TypeGenericVisitor(context.getWorkbench(),
-                                                      Elements.buildElement(type));
-                    } else if (context.getNode() instanceof FieldNode) {
+                                Elements.buildElement(type));
+                    } else if (context.getFieldNode() != null) {
                         return new FieldGenericVisitor(context.getWorkbench(),
-                                                       Elements.buildElement(type),
-                                                       (FieldNode) context.getNode());
+                                Elements.buildElement(type),
+                                context.getFieldNode());
 
-                    } else if ((context.getNode() instanceof MethodNode) &&
+                    } else if ((context.getMethodNode() != null) &&
                             (context.getParameterIndex() == BindingContext.NO_INDEX)) {
                         return new MethodGenericVisitor(context.getWorkbench(),
-                                                        Elements.buildElement(type),
-                                                        (MethodNode) context.getNode());
+                                Elements.buildElement(type),
+                                context.getMethodNode());
                     } else {
                         // last case: method parameter annotation
                         return new ParameterGenericVisitor(context.getWorkbench(),
-                                                           Elements.buildElement(type),
-                                                           (MethodNode) context.getNode(),
-                                                           context.getParameterIndex());
+                                Elements.buildElement(type),
+                                context.getMethodNode(),
+                                context.getParameterIndex());
                     }
                 }
 
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistry.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistry.java
index 8ea953f..dca7bce 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistry.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistry.java
@@ -146,8 +146,7 @@
                 (handler.getValue() == null)) {
             // No attributes specified, use annotation type as element's source
             element = Elements.buildElement(type);
-        } else if ((handler.getNamespace() == null) &&
-                (handler.getValue() != null)) {
+        } else if ((handler.getNamespace() == null)) {
             // Namespace attribute is omitted
             element = Elements.buildElement(handler.getValue());
         } else {
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/Selection.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/Selection.java
index f4fefc2..721e1e9 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/Selection.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/Selection.java
@@ -30,7 +30,6 @@
 import org.objectweb.asm.Type;
 import org.objectweb.asm.tree.ClassNode;
 import org.objectweb.asm.tree.FieldNode;
-import org.objectweb.asm.tree.MemberNode;
 import org.objectweb.asm.tree.MethodNode;
 
 import java.lang.annotation.ElementType;
@@ -47,7 +46,9 @@
     private BindingRegistry registry;
     private ComponentWorkbench workbench;
     private Reporter reporter;
-    private MemberNode node;
+    private FieldNode field;
+    private MethodNode method;
+    private ClassNode clazz;
     private int index = BindingContext.NO_INDEX;
     private String annotation;
     private ElementType elementType = null;
@@ -61,21 +62,21 @@
 
     public Selection field(FieldVisitor visitor, FieldNode node) {
         this.visitor = visitor;
-        this.node = node;
+        this.field = node;
         this.elementType = ElementType.FIELD;
         return this;
     }
 
     public Selection method(MethodVisitor visitor, MethodNode node) {
         this.visitor = visitor;
-        this.node = node;
+        this.method = node;
         this.elementType = ElementType.METHOD;
         return this;
     }
 
     public Selection type(ClassVisitor visitor, ClassNode node) {
         this.visitor = visitor;
-        this.node = node;
+        this.clazz = node;
         this.elementType = ElementType.TYPE;
         return this;
     }
@@ -83,7 +84,7 @@
     public Selection parameter(MethodVisitor visitor, MethodNode node, int index) {
         this.visitor = visitor;
         this.index = index;
-        this.node = node;
+        this.method = node;
         this.elementType = ElementType.PARAMETER;
         return this;
     }
@@ -110,8 +111,21 @@
     }
 
     private List<AnnotationVisitor> list() {
+        BindingContext context;
 
-        BindingContext context = new BindingContext(workbench, reporter, Type.getType(annotation), node, elementType, index, visitor);
+        if (elementType == ElementType.FIELD) {
+            context = new BindingContext(workbench, reporter, Type.getType(annotation), field,
+                    elementType, index, visitor);
+        } else if (elementType == ElementType.TYPE) {
+            context = new BindingContext(workbench, reporter, Type.getType(annotation), clazz,
+                    elementType, index, visitor);
+        } else {
+            // Parameter of method.
+            context = new BindingContext(workbench, reporter, Type.getType(annotation), method,
+                    elementType, index, visitor);
+        }
+
+
         List<Binding> predicates = registry.getBindings(annotation);
 
         List<AnnotationVisitor> visitors = new ArrayList<AnnotationVisitor>();
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ComponentVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ComponentVisitor.java
index 71462e8..291e214 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ComponentVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ComponentVisitor.java
@@ -24,14 +24,14 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
  * Parse the @Component annotation.
  * @see org.apache.felix.ipojo.annotations.Component
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class ComponentVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class ComponentVisitor extends AnnotationVisitor {
 
     private Reporter reporter;
 
@@ -45,6 +45,7 @@
     private ComponentWorkbench workbench;
 
     public ComponentVisitor(ComponentWorkbench workbench, Reporter reporter) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
         this.reporter = reporter;
     }
@@ -53,7 +54,7 @@
      * Visit @Component annotation attribute.
      * @param name attribute name
      * @param value attribute value
-     * @see org.objectweb.asm.commons.EmptyVisitor#visit(java.lang.String, java.lang.Object)
+     * @see org.objectweb.asm.AnnotationVisitor#visit(java.lang.String, java.lang.Object)
      */
     public void visit(String name, Object value) {
         if (name.equals("public_factory")  || name.equals("publicFactory")) {
@@ -115,7 +116,7 @@
     /**
      * End of the visit.
      * Append to the "component" element computed attribute.
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitEnd()
+     * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
      */
     public void visitEnd() {
 
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ControllerVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ControllerVisitor.java
index e7d33af..88081f0 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ControllerVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ControllerVisitor.java
@@ -23,27 +23,28 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
  * Parses the @Controller annotation.
  * @see org.apache.felix.ipojo.annotations.Controller
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class ControllerVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class ControllerVisitor extends AnnotationVisitor {
 
     private ComponentWorkbench workbench;
 
     private String field;
 
     public ControllerVisitor(ComponentWorkbench workbench, String field) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
         this.field = field;
     }
 
     /**
      * Visit @Handler annotation attributes.
-     * @see org.objectweb.asm.commons.EmptyVisitor#visit(String, Object)
+     * @see org.objectweb.asm.AnnotationVisitor#visit(String, Object)
      */
     public void visitEnd() {
         Element controller = new Element("controller", "");
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/FieldPropertyVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/FieldPropertyVisitor.java
index 512ad5d..1d6bec9 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/FieldPropertyVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/FieldPropertyVisitor.java
@@ -22,7 +22,7 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
  * Parses a Property or ServiceProperty annotation.
@@ -30,7 +30,7 @@
  * @see org.apache.felix.ipojo.annotations.Property
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class FieldPropertyVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class FieldPropertyVisitor extends AnnotationVisitor {
 
     /**
      * Parent element element.
@@ -82,6 +82,7 @@
      * @param field : field name.
      */
     public FieldPropertyVisitor(String field, Element parent) {
+        super(Opcodes.ASM5);
         m_parent = parent;
         m_field = field;
     }
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/HandlerDeclarationVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/HandlerDeclarationVisitor.java
index 229f01e..2c52783 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/HandlerDeclarationVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/HandlerDeclarationVisitor.java
@@ -24,7 +24,7 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 import org.w3c.dom.Attr;
 import org.w3c.dom.Document;
 import org.w3c.dom.NamedNodeMap;
@@ -40,7 +40,7 @@
  * @see org.apache.felix.ipojo.annotations.HandlerDeclaration
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class HandlerDeclarationVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class HandlerDeclarationVisitor extends AnnotationVisitor {
 
     /**
      * XML accepted by the handler.
@@ -53,6 +53,7 @@
     private Reporter reporter;
 
     public HandlerDeclarationVisitor(ComponentWorkbench workbench, DocumentBuilder builder, Reporter reporter) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
         this.builder = builder;
         this.reporter = reporter;
@@ -62,7 +63,7 @@
      * Parses the value attribute.
      * @param name 'value'
      * @param value the value
-     * @see org.objectweb.asm.commons.EmptyVisitor#visit(java.lang.String, java.lang.Object)
+     * @see org.objectweb.asm.AnnotationVisitor#visit(java.lang.String, java.lang.Object)
      */
     public void visit(String name, Object value) {
         // there is only a 'value' attribute
@@ -72,7 +73,7 @@
     /**
      * End of the visit.
      * Builds the XML document.
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitEnd()
+     * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
      */
     public void visitEnd() {
         // The value is an XML document
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/HandlerVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/HandlerVisitor.java
index 9ecf3d6..ae97861 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/HandlerVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/HandlerVisitor.java
@@ -24,14 +24,15 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
  * Parses the @Handler annotation.
- * @see org.apache.felix.ipojo.annotations.Handler
+ *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ * @see org.apache.felix.ipojo.annotations.Handler
  */
-public class HandlerVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class HandlerVisitor extends AnnotationVisitor {
 
     private Element handler = new Element("handler", "");
 
@@ -40,15 +41,17 @@
     private Reporter reporter;
 
     public HandlerVisitor(ComponentWorkbench workbench, Reporter reporter) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
         this.reporter = reporter;
     }
 
     /**
      * Visit @Handler annotation attributes.
-     * @param name : annotation attribute name
+     *
+     * @param name  : annotation attribute name
      * @param value : annotation attribute value
-     * @see org.objectweb.asm.commons.EmptyVisitor#visit(java.lang.String, java.lang.Object)
+     * @see org.objectweb.asm.AnnotationVisitor#visit(java.lang.String, java.lang.Object)
      */
     public void visit(String name, Object value) {
         if (name.equals("name")) {
@@ -72,7 +75,8 @@
     /**
      * End of the visit.
      * Append to the "component" element computed attribute.
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitEnd()
+     *
+     * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
      */
     public void visitEnd() {
 
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/InstantiateVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/InstantiateVisitor.java
index 5018117..7cf43cb 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/InstantiateVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/InstantiateVisitor.java
@@ -23,28 +23,31 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
  * Parse the @Instantitate annotation.
- * @see org.apache.felix.ipojo.annotations.Instantiate
+ *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ * @see org.apache.felix.ipojo.annotations.Instantiate
  */
-public class InstantiateVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class InstantiateVisitor extends AnnotationVisitor {
 
     private Element instance = new Element("instance", "");
 
     private ComponentWorkbench workbench;
 
     public InstantiateVisitor(ComponentWorkbench workbench) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
     }
 
     /**
      * Visit an annotation attribute.
-     * @param name the attribute name
+     *
+     * @param name  the attribute name
      * @param value the attribute value
-     * @see org.objectweb.asm.commons.EmptyVisitor#visit(java.lang.String, java.lang.Object)
+     * @see org.objectweb.asm.AnnotationVisitor#visit(java.lang.String, java.lang.Object)
      */
     public void visit(String name, Object value) {
         if (name.equals("name")) {
@@ -54,7 +57,8 @@
 
     /**
      * End of the visit. Creates the instance element.
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitEnd()
+     *
+     * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
      */
     public void visitEnd() {
         // We set the instance's component attribute to the class name, if the component type has a custom name,
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/LifecycleVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/LifecycleVisitor.java
index 61ea087..08cf660 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/LifecycleVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/LifecycleVisitor.java
@@ -23,7 +23,7 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
  * Parse @Validate and @Invalidate annotations.
@@ -31,7 +31,7 @@
  * @see org.apache.felix.ipojo.annotations.Invalidate
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class LifecycleVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class LifecycleVisitor extends AnnotationVisitor {
 
     public static enum Transition {
         VALIDATE, INVALIDATE
@@ -42,6 +42,7 @@
     private Transition transition;
 
     public LifecycleVisitor(ComponentWorkbench workbench, String name, Transition transition) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
         this.name = name;
         this.transition = transition;
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/MethodPropertyVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/MethodPropertyVisitor.java
index 1cf82ab..898c740 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/MethodPropertyVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/MethodPropertyVisitor.java
@@ -22,14 +22,14 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 import static org.apache.felix.ipojo.manipulator.metadata.annotation.visitor.util.Names.computeEffectiveMethodName;
 
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class MethodPropertyVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class MethodPropertyVisitor extends AnnotationVisitor {
 
     /**
      * Parent element.
@@ -73,6 +73,7 @@
      * @param method : attached method.
      */
     public MethodPropertyVisitor(Element parent, String method) {
+        super(Opcodes.ASM5);
         m_parent = parent;
         m_method = method;
     }
@@ -82,7 +83,7 @@
      *
      * @param name : annotation name
      * @param value : annotation value
-     * @see org.objectweb.asm.commons.EmptyVisitor#visit(java.lang.String, java.lang.Object)
+     * @see org.objectweb.asm.AnnotationVisitor#visit(java.lang.String, java.lang.Object)
      */
     public void visit(String name, Object value) {
         if (name.equals("name")) {
@@ -110,7 +111,7 @@
      * End of the visit.
      * Append the computed element to the element element.
      *
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitEnd()
+     * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
      */
     public void visitEnd() {
         Element prop = visitEndCommon();
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ParameterPropertyVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ParameterPropertyVisitor.java
index fb5ca87..208728d 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ParameterPropertyVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ParameterPropertyVisitor.java
@@ -28,7 +28,7 @@
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class ParameterPropertyVisitor extends MethodPropertyVisitor implements AnnotationVisitor {
+public class ParameterPropertyVisitor extends MethodPropertyVisitor {
 
     /**
      * If this is a parameter annotation, the index of the parameter.
@@ -54,7 +54,7 @@
      * End of the visit.
      * Append the computed element to the element element.
      *
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitEnd()
+     * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
      */
     public void visitEnd() {
         Element prop = visitEndCommon();
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/PostRegistrationVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/PostRegistrationVisitor.java
index 873fde8..00a6c22 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/PostRegistrationVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/PostRegistrationVisitor.java
@@ -23,25 +23,26 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
- * @see org.apache.felix.ipojo.annotations.PostRegistration
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ * @see org.apache.felix.ipojo.annotations.PostRegistration
  */
-public class PostRegistrationVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class PostRegistrationVisitor extends AnnotationVisitor {
 
     private ComponentWorkbench workbench;
     private String name;
 
     public PostRegistrationVisitor(ComponentWorkbench workbench, String name) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
         this.name = name;
     }
 
     @Override
     public void visitEnd() {
-        Element provides = null;
+        Element provides;
         if (workbench.getIds().containsKey("provides")) {
             provides = workbench.getIds().get("provides");
             provides.addAttribute(new Attribute("post-registration", name));
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/PostUnregistrationVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/PostUnregistrationVisitor.java
index eae941e..cd24451 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/PostUnregistrationVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/PostUnregistrationVisitor.java
@@ -23,25 +23,26 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
  * @see org.apache.felix.ipojo.annotations.PostUnregistration
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class PostUnregistrationVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class PostUnregistrationVisitor extends AnnotationVisitor {
 
     private ComponentWorkbench workbench;
     private String name;
 
     public PostUnregistrationVisitor(ComponentWorkbench workbench, String name) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
         this.name = name;
     }
 
     @Override
     public void visitEnd() {
-        Element provides = null;
+        Element provides;
         if (workbench.getIds().containsKey("provides")) {
             provides = workbench.getIds().get("provides");
             provides.addAttribute(new Attribute("post-unregistration", name));
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ProvidesVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ProvidesVisitor.java
index d23aa33..dcce996 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ProvidesVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ProvidesVisitor.java
@@ -23,15 +23,16 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.Type;
-import org.objectweb.asm.commons.EmptyVisitor;
 
 /**
  * Parse the @Provides annotation.
- * @see org.apache.felix.ipojo.annotations.Provides
+ *
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ * @see org.apache.felix.ipojo.annotations.Provides
  */
-public class ProvidesVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class ProvidesVisitor extends AnnotationVisitor {
 
     private ComponentWorkbench workbench;
 
@@ -41,14 +42,16 @@
     private Element m_prov = new Element("provides", "");
 
     public ProvidesVisitor(ComponentWorkbench workbench) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
     }
 
     /**
      * Visit @provides annotation attributes.
-     * @param name : annotation attribute name
+     *
+     * @param name  : annotation attribute name
      * @param value : annotation attribute value
-     * @see org.objectweb.asm.commons.EmptyVisitor#visit(java.lang.String, java.lang.Object)
+     * @see org.objectweb.asm.AnnotationVisitor#visit(java.lang.String, java.lang.Object)
      */
     public void visit(String name, Object value) {
         if (name.equals("factory")) { // Should be deprecated
@@ -61,9 +64,10 @@
 
     /**
      * Visit specifications array.
+     *
      * @param name : attribute name
      * @return a visitor visiting each element of the array.
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitArray(java.lang.String)
+     * @see org.objectweb.asm.AnnotationVisitor#visitArray(java.lang.String)
      */
     public AnnotationVisitor visitArray(String name) {
         if (name.equals("specifications")) {
@@ -71,7 +75,7 @@
         } else if (name.equals("properties")) {
             // Create a new simple visitor to visit the nested ServiceProperty annotations
             // Collected properties are collected in m_prov
-            return new EmptyVisitor() {
+            return new AnnotationVisitor(Opcodes.ASM5) {
                 public AnnotationVisitor visitAnnotation(String ignored, String desc) {
                     return new FieldPropertyVisitor(m_prov);
                 }
@@ -84,24 +88,31 @@
     /**
      * End of the visit.
      * Append to the element element the computed "provides" element.
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitEnd()
+     *
+     * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
      */
     public void visitEnd() {
         workbench.getIds().put("provides", m_prov);
         workbench.getElements().put(m_prov, null);
     }
 
-    private class InterfaceArrayVisitor extends EmptyVisitor {
+    private class InterfaceArrayVisitor extends AnnotationVisitor {
         /**
          * List of parsed interface.
          */
         private String m_itfs;
 
+
+        public InterfaceArrayVisitor() {
+            super(Opcodes.ASM5);
+        }
+
         /**
          * Visit one element of the array.
+         *
          * @param arg0 : null
          * @param arg1 : element value.
-         * @see org.objectweb.asm.commons.EmptyVisitor#visit(java.lang.String, java.lang.Object)
+         * @see org.objectweb.asm.AnnotationVisitor#visit(java.lang.String, java.lang.Object)
          */
         public void visit(String arg0, Object arg1) {
             if (m_itfs == null) {
@@ -114,7 +125,8 @@
         /**
          * End of the array visit.
          * Add the attribute to 'provides' element.
-         * @see org.objectweb.asm.commons.EmptyVisitor#visitEnd()
+         *
+         * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
          */
         public void visitEnd() {
             m_prov.addAttribute(new Attribute("specifications", m_itfs + "}"));
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/RequiresVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/RequiresVisitor.java
index 3fef762..9213949 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/RequiresVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/RequiresVisitor.java
@@ -23,15 +23,15 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.Type;
-import org.objectweb.asm.commons.EmptyVisitor;
 
 /**
  * AnnotationVisitor parsing the @Requires annotation.
  * @see org.apache.felix.ipojo.annotations.Requires
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class RequiresVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class RequiresVisitor extends AnnotationVisitor {
 
 
     private ComponentWorkbench workbench;
@@ -106,6 +106,7 @@
      * @param name : field name.
      */
     public RequiresVisitor(ComponentWorkbench workbench, String name) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
         this.m_field = name;
     }
@@ -188,7 +189,7 @@
      * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
      */
     public void visitEnd() {
-        Element requires = null;
+        Element requires;
         if (m_id == null) {
             requires = workbench.getIds().get(m_field);
         } else {
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ServiceControllerVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ServiceControllerVisitor.java
index 5aad731..422bb9d 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ServiceControllerVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ServiceControllerVisitor.java
@@ -22,15 +22,15 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.Type;
-import org.objectweb.asm.commons.EmptyVisitor;
 
 /**
  * Parses a @ServiceController annotation.
  * @see org.apache.felix.ipojo.annotations.ServiceController
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class ServiceControllerVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class ServiceControllerVisitor extends AnnotationVisitor {
 
     /**
      * Parent element.
@@ -48,6 +48,7 @@
      * @param field : field name.
      */
     public ServiceControllerVisitor(String field, Element provides) {
+        super(Opcodes.ASM5);
         this.provides = provides;
         controller.addAttribute(new Attribute("field", field));
     }
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/UpdatedVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/UpdatedVisitor.java
index 7a3d844..dd4b379 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/UpdatedVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/UpdatedVisitor.java
@@ -24,18 +24,19 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
- * @see org.apache.felix.ipojo.annotations.Updated
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
+ * @see org.apache.felix.ipojo.annotations.Updated
  */
-public class UpdatedVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class UpdatedVisitor extends AnnotationVisitor {
 
     private ComponentWorkbench workbench;
     private String name;
 
     public UpdatedVisitor(ComponentWorkbench workbench, String name) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
         this.name = name;
     }
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/bind/AbstractBindVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/bind/AbstractBindVisitor.java
index 584c829..a00bed6 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/bind/AbstractBindVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/bind/AbstractBindVisitor.java
@@ -24,18 +24,19 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.Type;
-import org.objectweb.asm.commons.EmptyVisitor;
 
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public abstract class AbstractBindVisitor extends EmptyVisitor implements AnnotationVisitor {
+public abstract class AbstractBindVisitor extends AnnotationVisitor {
 
     protected ComponentWorkbench workbench;
     protected Action action;
 
     public AbstractBindVisitor(ComponentWorkbench workbench, Action action) {
+        super(Opcodes.ASM5);
         this.workbench = workbench;
         this.action = action;
     }
@@ -81,9 +82,9 @@
     /**
      * Visit annotation's attributes.
      *
-     * @param name : annotation name
+     * @param name  : annotation name
      * @param value : annotation value
-     * @see org.objectweb.asm.commons.EmptyVisitor#visit(String, Object)
+     * @see org.objectweb.asm.AnnotationVisitor#visit(String, Object)
      */
     public void visit(String name, Object value) {
         if (name.equals("filter")) {
@@ -100,7 +101,7 @@
         }
         if (name.equals("specification")) {
             // Detect whether it's an internal class name.
-            if (value.toString().startsWith("L")  && value.toString().endsWith(";")) {
+            if (value.toString().startsWith("L") && value.toString().endsWith(";")) {
                 Type type = Type.getType(value.toString());
                 m_specification = type.getClassName();
             } else {
@@ -134,7 +135,7 @@
     @Override
     public void visitEnum(String name, String desc, String value) {
         if (name.equals("policy")) {
-            m_policy = RequiresVisitor.getPolicy(value.toString());
+            m_policy = RequiresVisitor.getPolicy(value);
         }
     }
 
@@ -157,32 +158,15 @@
     }
 
     protected boolean completeExistingRequires(Element requires) {
-
-        if (!completeAttribute(requires, "specification", m_specification))
-            return false;
-
-        if (!completeAttribute(requires, "optional", m_optional))
-            return false;
-
-        if (!completeAttribute(requires, "aggregate", m_aggregate))
-            return false;
-
-        if (!completeAttribute(requires, "filter", m_filter))
-            return false;
-
-        if (!completeAttribute(requires, "policy", m_policy))
-            return false;
-
-        if (!completeAttribute(requires, "comparator", m_comparator))
-            return false;
-
-        if (!completeAttribute(requires, "from", m_from))
-            return false;
-
-        if(!completeAttribute(requires, "proxy", m_proxy))
-            return false;
-
-        return true;
+        return
+                completeAttribute(requires, "specification", m_specification)
+                        && completeAttribute(requires, "optional", m_optional)
+                        && completeAttribute(requires, "aggregate", m_aggregate)
+                        && completeAttribute(requires, "filter", m_filter)
+                        && completeAttribute(requires, "policy", m_policy)
+                        && completeAttribute(requires, "comparator", m_comparator)
+                        && completeAttribute(requires, "from", m_from)
+                        && completeAttribute(requires, "proxy", m_proxy);
     }
 
     private boolean completeAttribute(Element requires, String name, String value) {
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/GenericVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/GenericVisitor.java
index cd1296a..caf1216 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/GenericVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/GenericVisitor.java
@@ -23,27 +23,29 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.Type;
-import org.objectweb.asm.commons.EmptyVisitor;
 
 import java.lang.reflect.Array;
 
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class GenericVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class GenericVisitor extends AnnotationVisitor {
     protected Element element;
 
     public GenericVisitor(Element element) {
+        super(Opcodes.ASM5);
         this.element = element;
     }
 
     /**
      * Visit a 'simple' annotation attribute.
      * This method is used for primitive arrays too.
-     * @param name : attribute name
+     *
+     * @param name  : attribute name
      * @param value : attribute value
-     * @see org.objectweb.asm.commons.EmptyVisitor#visit(String, Object)
+     * @see org.objectweb.asm.AnnotationVisitor#visit(String, Object)
      */
     public void visit(String name, Object value) {
         if (value.getClass().isArray()) {
@@ -74,10 +76,11 @@
 
     /**
      * Visit a sub-annotation.
-     * @param name : attribute name.
+     *
+     * @param name       : attribute name.
      * @param descriptor : annotation description
      * @return an annotation visitor which will visit the given annotation
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitAnnotation(String, String)
+     * @see org.objectweb.asm.AnnotationVisitor#visitAnnotation(String, String)
      */
     public AnnotationVisitor visitAnnotation(String name, String descriptor) {
         // Sub annotations are mapped to sub-elements
@@ -88,9 +91,10 @@
 
     /**
      * Visit an array attribute.
+     *
      * @param name : attribute name
      * @return a visitor which will visit each element of the array
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitArray(String)
+     * @see org.objectweb.asm.AnnotationVisitor#visitArray(String)
      */
     public AnnotationVisitor visitArray(String name) {
         return new SubArrayVisitor(element, name);
@@ -98,8 +102,9 @@
 
     /**
      * Visits an enumeration attribute.
-     * @param name the attribute name
-     * @param desc the enumeration descriptor
+     *
+     * @param name  the attribute name
+     * @param desc  the enumeration descriptor
      * @param value the attribute value
      * @see org.objectweb.asm.AnnotationVisitor#visitEnum(String, String, String)
      */
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/GenericVisitorFactory.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/GenericVisitorFactory.java
index c08bdc1..eefa6bc 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/GenericVisitorFactory.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/GenericVisitorFactory.java
@@ -23,15 +23,12 @@
 import org.apache.felix.ipojo.manipulator.spi.BindingContext;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
-import org.objectweb.asm.tree.ClassNode;
-import org.objectweb.asm.tree.FieldNode;
-import org.objectweb.asm.tree.MethodNode;
 
 /**
-* User: guillaume
-* Date: 11/07/13
-* Time: 14:41
-*/
+ * User: guillaume
+ * Date: 11/07/13
+ * Time: 14:41
+ */
 public class GenericVisitorFactory implements AnnotationVisitorFactory {
     private final String m_name;
     private final String m_namespace;
@@ -43,25 +40,25 @@
 
     // Need to build a new Element instance for each created visitor
     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-        if (context.getNode() instanceof ClassNode) {
+        if (context.getClassNode() != null) {
             return new TypeGenericVisitor(context.getWorkbench(),
-                                          new Element(m_name, m_namespace));
-        } else if (context.getNode() instanceof FieldNode) {
+                    new Element(m_name, m_namespace));
+        } else if (context.getFieldNode() != null) {
             return new FieldGenericVisitor(context.getWorkbench(),
-                                           new Element(m_name, m_namespace),
-                                           (FieldNode) context.getNode());
+                    new Element(m_name, m_namespace),
+                    context.getFieldNode());
 
-        } else if ((context.getNode() instanceof MethodNode) &&
+        } else if ((context.getMethodNode() != null) &&
                 (context.getParameterIndex() == BindingContext.NO_INDEX)) {
             return new MethodGenericVisitor(context.getWorkbench(),
-                                            new Element(m_name, m_namespace),
-                                            (MethodNode) context.getNode());
+                    new Element(m_name, m_namespace),
+                    context.getMethodNode());
         } else {
             // last case: method parameter annotation
             return new ParameterGenericVisitor(context.getWorkbench(),
-                                               new Element(m_name, m_namespace),
-                                               (MethodNode) context.getNode(),
-                                               context.getParameterIndex());
+                    new Element(m_name, m_namespace),
+                    context.getMethodNode(),
+                    context.getParameterIndex());
         }
     }
 
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/SubArrayVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/SubArrayVisitor.java
index e70727d..6186382 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/SubArrayVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/SubArrayVisitor.java
@@ -23,13 +23,13 @@
 import org.apache.felix.ipojo.metadata.Attribute;
 import org.apache.felix.ipojo.metadata.Element;
 import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.Type;
-import org.objectweb.asm.commons.EmptyVisitor;
 
 /**
  * @author <a href="mailto:dev@felix.apache.org">Felix Project Team</a>
  */
-public class SubArrayVisitor extends EmptyVisitor implements AnnotationVisitor {
+public class SubArrayVisitor extends AnnotationVisitor {
 
     /**
      * Parent element.
@@ -49,19 +49,22 @@
 
     /**
      * Constructor.
+     *
      * @param elem : element element.
      * @param name : attribute name.
      */
     public SubArrayVisitor(Element elem, String name) {
+        super(Opcodes.ASM5);
         m_elem = elem;
         m_name = name;
     }
 
     /**
      * Visit a 'simple' element of the visited array.
-     * @param name : null
+     *
+     * @param name  : null
      * @param value : element value.
-     * @see org.objectweb.asm.commons.EmptyVisitor#visit(String, Object)
+     * @see org.objectweb.asm.AnnotationVisitor#visit(String, Object)
      */
     public void visit(String name, Object value) {
         if (m_acc == null) {
@@ -83,8 +86,9 @@
 
     /**
      * Visits an enumeration attribute.
-     * @param name the attribute name
-     * @param desc the enumeration descriptor
+     *
+     * @param name  the attribute name
+     * @param desc  the enumeration descriptor
      * @param value the attribute value
      */
     public void visitEnum(String name, String desc, String value) {
@@ -98,10 +102,11 @@
 
     /**
      * Visit an annotation element of the visited array.
+     *
      * @param name : null
      * @param desc : annotation to visit
      * @return the visitor which will visit the annotation
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitAnnotation(String, String)
+     * @see org.objectweb.asm.AnnotationVisitor#visitAnnotation(String, String)
      */
     public AnnotationVisitor visitAnnotation(String name, String desc) {
         // Sub annotations are map to sub-elements
@@ -112,7 +117,8 @@
 
     /**
      * End of the visit.
-     * @see org.objectweb.asm.commons.EmptyVisitor#visitEnd()
+     *
+     * @see org.objectweb.asm.AnnotationVisitor#visitEnd()
      */
     public void visitEnd() {
         if (m_acc != null) {
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/FieldStereotypeVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/FieldStereotypeVisitor.java
index 3dbf020..e63debe 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/FieldStereotypeVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/FieldStereotypeVisitor.java
@@ -21,20 +21,20 @@
 
 import org.apache.felix.ipojo.manipulator.metadata.annotation.model.AnnotationType;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.model.Playback;
+import org.objectweb.asm.AnnotationVisitor;
 import org.objectweb.asm.FieldVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
- * User: guillaume
- * Date: 30/05/13
- * Time: 18:55
+ * Parses stereotypes for field.
  */
-public class FieldStereotypeVisitor extends EmptyVisitor {
+public class FieldStereotypeVisitor extends AnnotationVisitor {
 
     private final FieldVisitor m_delegate;
     private final AnnotationType m_annotationType;
 
     public FieldStereotypeVisitor(final FieldVisitor delegate, AnnotationType annotationType) {
+        super(Opcodes.ASM5);
         this.m_delegate = delegate;
         m_annotationType = annotationType;
     }
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/MethodStereotypeVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/MethodStereotypeVisitor.java
index f7f0bfd..716eec2 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/MethodStereotypeVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/MethodStereotypeVisitor.java
@@ -21,20 +21,20 @@
 
 import org.apache.felix.ipojo.manipulator.metadata.annotation.model.AnnotationType;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.model.Playback;
+import org.objectweb.asm.AnnotationVisitor;
 import org.objectweb.asm.MethodVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
- * User: guillaume
- * Date: 30/05/13
- * Time: 18:55
+ * Parse stereotypes for methods.
  */
-public class MethodStereotypeVisitor extends EmptyVisitor {
+public class MethodStereotypeVisitor extends AnnotationVisitor {
 
     private final MethodVisitor m_delegate;
     private final AnnotationType m_annotationType;
 
     public MethodStereotypeVisitor(final MethodVisitor delegate, AnnotationType annotationType) {
+        super(Opcodes.ASM5);
         this.m_delegate = delegate;
         m_annotationType = annotationType;
     }
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/ParameterStereotypeVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/ParameterStereotypeVisitor.java
index 2c8beef..c766040 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/ParameterStereotypeVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/ParameterStereotypeVisitor.java
@@ -21,21 +21,23 @@
 
 import org.apache.felix.ipojo.manipulator.metadata.annotation.model.AnnotationType;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.model.Playback;
+import org.objectweb.asm.AnnotationVisitor;
 import org.objectweb.asm.MethodVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
  * User: guillaume
  * Date: 30/05/13
  * Time: 18:55
  */
-public class ParameterStereotypeVisitor extends EmptyVisitor {
+public class ParameterStereotypeVisitor extends AnnotationVisitor {
 
     private final MethodVisitor m_delegate;
     private final int index;
     private final AnnotationType m_annotationType;
 
     public ParameterStereotypeVisitor(final MethodVisitor delegate, final int index, AnnotationType annotationType) {
+        super(Opcodes.ASM5);
         this.m_delegate = delegate;
         this.index = index;
         m_annotationType = annotationType;
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/StereotypeVisitorFactory.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/StereotypeVisitorFactory.java
index c6c7122..b156f4d 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/StereotypeVisitorFactory.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/StereotypeVisitorFactory.java
@@ -26,9 +26,6 @@
 import org.objectweb.asm.ClassVisitor;
 import org.objectweb.asm.FieldVisitor;
 import org.objectweb.asm.MethodVisitor;
-import org.objectweb.asm.tree.ClassNode;
-import org.objectweb.asm.tree.FieldNode;
-import org.objectweb.asm.tree.MethodNode;
 
 /**
 * User: guillaume
@@ -43,14 +40,14 @@
     }
 
     public AnnotationVisitor newAnnotationVisitor(BindingContext context) {
-        if (context.getNode() instanceof ClassNode) {
+        if (context.getClassNode() != null) {
             return new TypeStereotypeVisitor((ClassVisitor) context.getVisitor(),
                                              m_annotationType);
-        } else if (context.getNode() instanceof FieldNode) {
+        } else if (context.getFieldNode() != null) {
             return new FieldStereotypeVisitor((FieldVisitor) context.getVisitor(),
                                               m_annotationType);
 
-        } else if ((context.getNode() instanceof MethodNode) &&
+        } else if ((context.getMethodNode() != null) &&
                 (context.getParameterIndex() == BindingContext.NO_INDEX)) {
             return new MethodStereotypeVisitor((MethodVisitor) context.getVisitor(),
                                                m_annotationType);
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/TypeStereotypeVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/TypeStereotypeVisitor.java
index 10493a1..a2e9ee2 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/TypeStereotypeVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/TypeStereotypeVisitor.java
@@ -21,20 +21,22 @@
 
 import org.apache.felix.ipojo.manipulator.metadata.annotation.model.AnnotationType;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.model.Playback;
+import org.objectweb.asm.AnnotationVisitor;
 import org.objectweb.asm.ClassVisitor;
-import org.objectweb.asm.commons.EmptyVisitor;
+import org.objectweb.asm.Opcodes;
 
 /**
  * User: guillaume
  * Date: 30/05/13
  * Time: 18:55
  */
-public class TypeStereotypeVisitor extends EmptyVisitor {
+public class TypeStereotypeVisitor extends AnnotationVisitor {
 
     private final ClassVisitor m_delegate;
     private final AnnotationType m_annotationType;
 
     public TypeStereotypeVisitor(final ClassVisitor delegate, AnnotationType annotationType) {
+        super(Opcodes.ASM5);
         this.m_delegate = delegate;
         m_annotationType = annotationType;
     }
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/spi/BindingContext.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/spi/BindingContext.java
index 316345c..1c04532 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/spi/BindingContext.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/spi/BindingContext.java
@@ -22,7 +22,9 @@
 import org.apache.felix.ipojo.manipulator.Reporter;
 import org.apache.felix.ipojo.manipulator.metadata.annotation.ComponentWorkbench;
 import org.objectweb.asm.Type;
-import org.objectweb.asm.tree.MemberNode;
+import org.objectweb.asm.tree.ClassNode;
+import org.objectweb.asm.tree.FieldNode;
+import org.objectweb.asm.tree.MethodNode;
 
 import java.lang.annotation.ElementType;
 
@@ -37,24 +39,58 @@
      *
      */
     private ComponentWorkbench workbench;
-    private MemberNode node;
+    private FieldNode field;
+    private MethodNode method;
+    private ClassNode clazz;
     private ElementType elementType;
     private int parameterIndex;
     private Reporter reporter;
     private Type annotationType;
     private Object visitor;
 
+
     public BindingContext(final ComponentWorkbench workbench,
                           final Reporter reporter,
                           final Type annotationType,
-                          final MemberNode node,
+                          final FieldNode node,
                           final ElementType elementType,
                           final int parameterIndex,
                           final Object visitor) {
+        this(workbench, reporter, annotationType, elementType, parameterIndex, visitor);
+        this.field = node;
+    }
+
+    public BindingContext(final ComponentWorkbench workbench,
+                          final Reporter reporter,
+                          final Type annotationType,
+                          final MethodNode node,
+                          final ElementType elementType,
+                          final int parameterIndex,
+                          final Object visitor) {
+        this(workbench, reporter, annotationType, elementType, parameterIndex, visitor);
+        this.method = node;
+    }
+
+    public BindingContext(final ComponentWorkbench workbench,
+                          final Reporter reporter,
+                          final Type annotationType,
+                          final ClassNode node,
+                          final ElementType elementType,
+                          final int parameterIndex,
+                          final Object visitor) {
+        this(workbench, reporter, annotationType, elementType, parameterIndex, visitor);
+        this.clazz = node;
+    }
+
+    private BindingContext(final ComponentWorkbench workbench,
+                           final Reporter reporter,
+                           final Type annotationType,
+                           final ElementType elementType,
+                           final int parameterIndex,
+                           final Object visitor) {
         this.workbench = workbench;
         this.reporter = reporter;
         this.annotationType = annotationType;
-        this.node = node;
         this.elementType = elementType;
         this.parameterIndex = parameterIndex;
         this.visitor = visitor;
@@ -64,8 +100,16 @@
         return workbench;
     }
 
-    public MemberNode getNode() {
-        return node;
+    public FieldNode getFieldNode() {
+        return field;
+    }
+
+    public MethodNode getMethodNode() {
+        return method;
+    }
+
+    public ClassNode getClassNode() {
+        return clazz;
     }
 
     public ElementType getElementType() {
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/spi/helper/Predicates.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/spi/helper/Predicates.java
index ddc4022..1c9c462 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/spi/helper/Predicates.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/spi/helper/Predicates.java
@@ -198,18 +198,18 @@
         public Predicate named(final String expected) {
             return new Predicate() {
                 public boolean matches(BindingContext context) {
-                    if (context.getNode() instanceof FieldNode) {
-                        FieldNode field = (FieldNode) context.getNode();
+                    if (context.getFieldNode() != null) {
+                        FieldNode field = context.getFieldNode();
                         return field.name.equals(expected);
                     }
 
-                    if (context.getNode() instanceof MethodNode) {
-                        MethodNode method = (MethodNode) context.getNode();
+                    if (context.getMethodNode() != null) {
+                        MethodNode method = context.getMethodNode();
                         return method.name.equals(expected);
                     }
 
-                    if (context.getNode() instanceof ClassNode) {
-                        ClassNode clazz = (ClassNode) context.getNode();
+                    if (context.getClassNode() != null) {
+                        ClassNode clazz = context.getClassNode();
                         return clazz.name.equals(expected);
                     }
 
diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/util/ChainedAnnotationVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/util/ChainedAnnotationVisitor.java
index cf138da..f7da4e0 100644
--- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/util/ChainedAnnotationVisitor.java
+++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/util/ChainedAnnotationVisitor.java
@@ -19,21 +19,25 @@
 
 package org.apache.felix.ipojo.manipulator.util;
 
+import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.Opcodes;
+
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.felix.ipojo.manipulator.metadata.annotation.model.discovery.ChainedAnnotationDiscovery;
-import org.objectweb.asm.AnnotationVisitor;
-
 /**
 * User: guillaume
 * Date: 10/07/13
 * Time: 16:43
 */
-public class ChainedAnnotationVisitor implements AnnotationVisitor {
+public class ChainedAnnotationVisitor extends AnnotationVisitor {
 
     private List<AnnotationVisitor> m_visitors = new ArrayList<AnnotationVisitor>();
 
+    public ChainedAnnotationVisitor() {
+        super(Opcodes.ASM5);
+    }
+
     public List<AnnotationVisitor> getVisitors() {
         return m_visitors;
     }
diff --git a/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/ClassCheckerTestCase.java b/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/ClassCheckerTestCase.java
index b6d8d6b..031b1cf 100644
--- a/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/ClassCheckerTestCase.java
+++ b/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/ClassCheckerTestCase.java
@@ -19,20 +19,17 @@
 
 package org.apache.felix.ipojo.manipulation;
 
+import junit.framework.TestCase;
+import org.apache.felix.ipojo.manipulator.util.Streams;
+import org.objectweb.asm.*;
+import org.osgi.framework.BundleContext;
+
 import java.io.ByteArrayInputStream;
 import java.io.File;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
 
-import junit.framework.TestCase;
-import org.apache.felix.ipojo.manipulator.util.Streams;
-import org.objectweb.asm.ClassReader;
-import org.objectweb.asm.MethodVisitor;
-import org.objectweb.asm.Type;
-import org.objectweb.asm.commons.EmptyVisitor;
-import org.osgi.framework.BundleContext;
-
 import static org.mockito.Mockito.mock;
 import static org.mockito.Mockito.when;
 
@@ -94,7 +91,7 @@
         assertEquals(1, annotations.size());
         ClassChecker.AnnotationDescriptor annotationDescriptor = annotations.get(0);
         MethodVisitor mv = mock(MethodVisitor.class);
-        when(mv.visitAnnotation(desc, true)).thenReturn(new EmptyVisitor());
+        when(mv.visitAnnotation(desc, true)).thenReturn(new AnnotationVisitor(Opcodes.ASM5) {});
         annotationDescriptor.visitAnnotation(mv);
     }
 
diff --git a/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/InnerClassAdapterTest.java b/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/InnerClassAdapterTest.java
index 0216535..4e81014 100644
--- a/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/InnerClassAdapterTest.java
+++ b/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/InnerClassAdapterTest.java
@@ -224,12 +224,12 @@
         boolean found = false;
         Constructor cst = null;
         Constructor[] csts = cl.getDeclaredConstructors();
-        for (int i = 0; i < csts.length; i++) {
-            System.out.println(Arrays.asList(csts[i].getParameterTypes()));
-            if (csts[i].getParameterTypes().length == 1 &&
-                    csts[i].getParameterTypes()[0].equals(InstanceManager.class)) {
+        for (Constructor cst2 : csts) {
+            System.out.println(Arrays.asList(cst2.getParameterTypes()));
+            if (cst2.getParameterTypes().length == 1 &&
+                    cst2.getParameterTypes()[0].equals(InstanceManager.class)) {
                 found = true;
-                cst = csts[i];
+                cst = cst2;
             }
         }
         Assert.assertTrue(found);
diff --git a/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/LegacyGenericBindingRegistryTestCase.java b/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/LegacyGenericBindingRegistryTestCase.java
index 1dbdd14..d87ea56 100644
--- a/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/LegacyGenericBindingRegistryTestCase.java
+++ b/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/LegacyGenericBindingRegistryTestCase.java
@@ -40,9 +40,9 @@
  */
 public class LegacyGenericBindingRegistryTestCase extends TestCase {
 
-    public static final String AN_IGNORED_ANNOTATION = "[an.ignored.Annotation;";
-    public static final String RECOGNISED_IPOJO_ANNOTATION = "[a.recognised.ipojo.Annotation;";
-    public static final String RECOGNISED_HANDLER_ANNOTATION = "[a.recognised.handler.Annotation;";
+    public static final String AN_IGNORED_ANNOTATION = "[Lan.ignored.Annotation;";
+    public static final String RECOGNISED_IPOJO_ANNOTATION = "[La.recognised.ipojo.Annotation;";
+    public static final String RECOGNISED_HANDLER_ANNOTATION = "[La.recognised.handler.Annotation;";
 
     @Mock
     private BindingRegistry delegate;
diff --git a/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistryTestCase.java b/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistryTestCase.java
index 4e05111..29d82d9 100644
--- a/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistryTestCase.java
+++ b/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistryTestCase.java
@@ -54,7 +54,7 @@
  */
 public class MetaAnnotationBindingRegistryTestCase extends TestCase {
 
-    public static final String DESCRIPTOR = "[unknown;";
+    public static final String DESCRIPTOR = "[Lunknown;";
     public static final Type TYPE = Type.getType(DESCRIPTOR);
 
     @Mock
diff --git a/ipojo/manipulator/online-manipulator/pom.xml b/ipojo/manipulator/online-manipulator/pom.xml
index 49b5659..4965af2 100644
--- a/ipojo/manipulator/online-manipulator/pom.xml
+++ b/ipojo/manipulator/online-manipulator/pom.xml
@@ -16,173 +16,174 @@
   specific language governing permissions and limitations
   under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.apache.felix</groupId>
-    <artifactId>felix-parent</artifactId>
-    <version>2.1</version>
-    <relativePath>../../../pom/pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <packaging>bundle</packaging>
-  <name>Apache Felix iPOJO - Online Manipulator</name>
-  <artifactId>org.apache.felix.ipojo.manipulator.online</artifactId>
-  <version>1.11.3-SNAPSHOT</version>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>felix-parent</artifactId>
+        <version>2.1</version>
+        <relativePath>../../../pom/pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <packaging>bundle</packaging>
+    <name>Apache Felix iPOJO - Online Manipulator</name>
+    <artifactId>org.apache.felix.ipojo.manipulator.online</artifactId>
+    <version>1.11.3-SNAPSHOT</version>
 
-  <description>
-    iPOJO online manipulator allowing install time manipulation of iPOJO bundle.
-  </description>
-  <url>
-    http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools/apache-felix-ipojo-online-manipulator.html
-  </url>
+    <description>
+        iPOJO online manipulator allowing install time manipulation of iPOJO bundle.
+    </description>
+    <url>
+        http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools/apache-felix-ipojo-online-manipulator.html
+    </url>
 
-  <properties>
-    <ipojo.import.packages>[1.11.0,2.0.0)</ipojo.import.packages>
-    <ipojo.manipulator.version>${project.version}</ipojo.manipulator.version>
-  </properties>
+    <properties>
+        <ipojo.import.packages>[1.11.0,2.0.0)</ipojo.import.packages>
+        <ipojo.manipulator.version>${project.version}</ipojo.manipulator.version>
+    </properties>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.core</artifactId>
-      <version>4.3.1</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.osgi</groupId>
-      <artifactId>org.osgi.compendium</artifactId>
-      <version>4.0.0</version>
-      <scope>provided</scope>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.ipojo.metadata</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.ipojo.manipulator</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.ipojo.annotations</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>asm</groupId>
-      <artifactId>asm-all</artifactId>
-    </dependency>
-    <dependency>
-      <groupId>org.mockito</groupId>
-      <artifactId>mockito-all</artifactId>
-      <version>1.9.5</version>
-      <scope>test</scope>
-    </dependency>
-  </dependencies>
-
-  <dependencyManagement>
     <dependencies>
-      <dependency>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>ipojo-manipulator-bom</artifactId>
-        <version>${project.version}</version>
-        <type>pom</type>
-        <scope>import</scope>
-      </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <version>4.3.1</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.compendium</artifactId>
+            <version>4.0.0</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.metadata</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.manipulator</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.annotations</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.ow2.asm</groupId>
+            <artifactId>asm-all</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>1.9.5</version>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
-  </dependencyManagement>
 
-  <build>
-    <resources>
-      <resource>
-        <directory>src/main/resources</directory>
-        <filtering>true</filtering>
-      </resource>
-    </resources>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <version>3.0</version>
-        <configuration>
-          <target>1.5</target>
-          <source>1.5</source>
-          <testTarget>1.5</testTarget>
-          <testSource>1.5</testSource>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-bundle-plugin</artifactId>
-        <version>2.3.7</version>
-        <extensions>true</extensions>
-        <configuration>
-          <instructions>
-            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
-            <Private-Package>org.apache.felix.ipojo.online.manipulator</Private-Package>
-            <Bundle-DocURL>
-              http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools/apache-felix-ipojo-online-manipulator.html
-            </Bundle-DocURL>
-            <Export-Package>
-              org.apache.felix.ipojo.manipulation*; version="${ipojo.manipulator.version}",
-              org.apache.felix.ipojo.xml.parser; version="${ipojo.manipulator.version}",
-              org.apache.felix.ipojo.manipulator*; version="${ipojo.manipulator.version}",
-              org.apache.felix.ipojo.annotations*; version="${ipojo.manipulator.version}",
-            </Export-Package>
-            <Private-Package>
-              org.objectweb.asm,
-              org.objectweb.asm.commons,
-              org.objectweb.asm.signature,
-              org.objectweb.asm.tree,
-              org.apache.felix.ipojo.online.manipulator
-            </Private-Package>
-            <Import-Package>!sun.io, org.osgi.framework;version=1.3, *
-            </Import-Package>
-          </instructions>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-        <artifactId>maven-ipojo-plugin</artifactId>
-        <version>${project.version}</version>
-        <executions>
-          <execution>
-            <goals>
-              <goal>ipojo-bundle</goal>
-            </goals>
-          </execution>
-        </executions>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-checkstyle-plugin</artifactId>
-        <version>2.10</version>
-        <configuration>
-          <enableRulesSummary>false</enableRulesSummary>
-          <violationSeverity>warning</violationSeverity>
-          <configLocation>http://felix.apache.org/ipojo/dev/checkstyle_ipojo.xml</configLocation>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.rat</groupId>
-        <artifactId>apache-rat-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>verify</phase>
-            <goals>
-              <goal>check</goal>
-            </goals>
-          </execution>
-        </executions>
-        <configuration>
-          <!-- check src only (except remote resources additions) -->
-          <includes>
-            <include>src/**</include>
-          </includes>
-          <excludes>
-            <exclude>src/main/appended-resources/**</exclude>
-            <exclude>src/main/resources/META-INF/**</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>ipojo-manipulator-bom</artifactId>
+                <version>${project.version}</version>
+                <type>pom</type>
+                <scope>import</scope>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+    <build>
+        <resources>
+            <resource>
+                <directory>src/main/resources</directory>
+                <filtering>true</filtering>
+            </resource>
+        </resources>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.0</version>
+                <configuration>
+                    <target>1.5</target>
+                    <source>1.5</source>
+                    <testTarget>1.5</testTarget>
+                    <testSource>1.5</testSource>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <version>2.3.7</version>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
+                        <Private-Package>org.apache.felix.ipojo.online.manipulator</Private-Package>
+                        <Bundle-DocURL>
+                            http://felix.apache.org/documentation/subprojects/apache-felix-ipojo/apache-felix-ipojo-tools/apache-felix-ipojo-online-manipulator.html
+                        </Bundle-DocURL>
+                        <Export-Package>
+                            org.apache.felix.ipojo.manipulation*; version="${ipojo.manipulator.version}",
+                            org.apache.felix.ipojo.xml.parser; version="${ipojo.manipulator.version}",
+                            org.apache.felix.ipojo.manipulator*; version="${ipojo.manipulator.version}",
+                            org.apache.felix.ipojo.annotations*; version="${ipojo.manipulator.version}",
+                        </Export-Package>
+                        <Private-Package>
+                            org.objectweb.asm,
+                            org.objectweb.asm.commons,
+                            org.objectweb.asm.signature,
+                            org.objectweb.asm.tree,
+                            org.apache.felix.ipojo.online.manipulator
+                        </Private-Package>
+                        <Import-Package>!sun.io, org.osgi.framework;version=1.3, *
+                        </Import-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-ipojo-plugin</artifactId>
+                <version>${project.version}</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>ipojo-bundle</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-checkstyle-plugin</artifactId>
+                <version>2.10</version>
+                <configuration>
+                    <enableRulesSummary>false</enableRulesSummary>
+                    <violationSeverity>warning</violationSeverity>
+                    <configLocation>http://felix.apache.org/ipojo/dev/checkstyle_ipojo.xml</configLocation>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.rat</groupId>
+                <artifactId>apache-rat-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>verify</phase>
+                        <goals>
+                            <goal>check</goal>
+                        </goals>
+                    </execution>
+                </executions>
+                <configuration>
+                    <!-- check src only (except remote resources additions) -->
+                    <includes>
+                        <include>src/**</include>
+                    </includes>
+                    <excludes>
+                        <exclude>src/main/appended-resources/**</exclude>
+                        <exclude>src/main/resources/META-INF/**</exclude>
+                    </excludes>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
 </project>
diff --git a/ipojo/runtime/api/pom.xml b/ipojo/runtime/api/pom.xml
index f3b6c52..d484aca 100644
--- a/ipojo/runtime/api/pom.xml
+++ b/ipojo/runtime/api/pom.xml
@@ -25,6 +25,9 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
     <packaging>bundle</packaging>
+    <properties>
+        <asm.version>5.0.2</asm.version>
+    </properties>
     <artifactId>org.apache.felix.ipojo.api</artifactId>
     <version>1.11.3-SNAPSHOT</version>
     <name>Apache Felix iPOJO API</name>
@@ -60,9 +63,9 @@
                         <Export-Package>
                             org.apache.felix.ipojo.api,
                             org.apache.felix.ipojo.api.composite,
-                            org.objectweb.asm.commons;version=3.3.1;-split-package:=merge-last,
-                            org.objectweb.asm;version=3.3.1;-split-package:=merge-last,
-                            org.objectweb.asm.signature;version=3.3.1;-split-package:=merge-last
+                            org.objectweb.asm.commons;version=${asm.version};-split-package:=merge-last,
+                            org.objectweb.asm;version=${asm.version};-split-package:=merge-last,
+                            org.objectweb.asm.signature;version=${asm.version};-split-package:=merge-last
                         </Export-Package>
                         <Private-Package>
                             org.objectweb.asm.commons,
diff --git a/ipojo/runtime/core-it/ipojo-core-declaration-test/pom.xml b/ipojo/runtime/core-it/ipojo-core-declaration-test/pom.xml
index 66b0d87..b917846 100644
--- a/ipojo/runtime/core-it/ipojo-core-declaration-test/pom.xml
+++ b/ipojo/runtime/core-it/ipojo-core-declaration-test/pom.xml
@@ -18,43 +18,49 @@
   under the License.
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
-  <parent>
-    <groupId>org.apache.felix</groupId>
-    <artifactId>org.apache.felix.ipojo.runtime.core-it</artifactId>
-    <version>1.11.3-SNAPSHOT</version>
-  </parent>
+    <parent>
+        <groupId>org.apache.felix</groupId>
+        <artifactId>org.apache.felix.ipojo.runtime.core-it</artifactId>
+        <version>1.11.3-SNAPSHOT</version>
+    </parent>
 
-  <modelVersion>4.0.0</modelVersion>
+    <modelVersion>4.0.0</modelVersion>
 
-  <artifactId>ipojo-core-declaration-test</artifactId>
+    <artifactId>ipojo-core-declaration-test</artifactId>
 
-  <name>${project.artifactId}</name>
+    <name>${project.artifactId}</name>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.felix</groupId>
-      <artifactId>org.apache.felix.ipojo.api</artifactId>
-      <version>1.11.3-SNAPSHOT</version>
-      <exclusions>
-        <exclusion>
-          <groupId>org.apache.felix</groupId>
-          <artifactId>org.osgi.core</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.osgi</groupId>
-          <artifactId>org.osgi.core</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>org.apache.felix</groupId>
-          <artifactId>org.apache.felix.ipojo</artifactId>
-        </exclusion>
-        <exclusion>
-          <groupId>asm</groupId>
-          <artifactId>asm-all</artifactId>
-        </exclusion>
-      </exclusions>
-    </dependency>
-  </dependencies>
+    <dependencies>
+        <dependency>
+            <groupId>org.ow2.asm</groupId>
+            <artifactId>asm-all</artifactId>
+            <version>5.0.1</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>org.apache.felix.ipojo.api</artifactId>
+            <version>1.11.3-SNAPSHOT</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.osgi.core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.osgi</groupId>
+                    <artifactId>org.osgi.core</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.apache.felix.ipojo</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.apache.felix</groupId>
+                    <artifactId>org.apache.felix.ipojo.composite</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    </dependencies>
 </project>
\ No newline at end of file
diff --git a/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/TestDeclarationBuilderService.java b/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/TestDeclarationBuilderService.java
index 35dc853..8bda8af 100644
--- a/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/TestDeclarationBuilderService.java
+++ b/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/TestDeclarationBuilderService.java
@@ -20,8 +20,6 @@
 package org.apache.felix.ipojo.runtime.core.test.declaration;

 

 import org.apache.felix.ipojo.IPojoFactory;

-//import org.apache.felix.ipojo.api.PrimitiveComponentType;

-//import org.apache.felix.ipojo.api.Service;

 import org.apache.felix.ipojo.extender.DeclarationBuilderService;

 import org.apache.felix.ipojo.extender.DeclarationHandle;

 import org.apache.felix.ipojo.extender.ExtensionDeclaration;

@@ -36,12 +34,7 @@
 import org.osgi.framework.BundleContext;

 

 import static java.lang.String.format;

-import static junit.framework.Assert.assertEquals;

-import static junit.framework.Assert.assertFalse;

-import static junit.framework.Assert.assertTrue;

-

-import java.util.Arrays;

-import java.util.List;

+import static junit.framework.Assert.*;

 

 public class TestDeclarationBuilderService extends Common {

 

@@ -70,7 +63,11 @@
         assertFalse(handle.getStatus().isBound());

         handle.publish();

 

-        osgiHelper.waitForService(HelloService.class, null, 1000);

+        // This test has been already ssen as failed.

+        HelloService hs = osgiHelper.waitForService(HelloService.class, "(factory.name=org.apache.felix.ipojo.runtime" +

+                ".core.test.components.FrenchHelloService)", 1000);

+        assertNotNull(hs);

+        System.out.println("Status: " + handle.getStatus().isBound());

 

         assertTrue(handle.getStatus().isBound());

         handle.retract();

diff --git a/ipojo/runtime/core-it/pom.xml b/ipojo/runtime/core-it/pom.xml
index 0723fc3..881a723 100644
--- a/ipojo/runtime/core-it/pom.xml
+++ b/ipojo/runtime/core-it/pom.xml
@@ -215,6 +215,12 @@
             <artifactId>tinybundles-ipojo</artifactId>
             <version>0.3.0</version>
             <scope>test</scope>
+            <exclusions>
+                <exclusion>
+                    <groupId>asm</groupId>
+                    <artifactId>asm-all</artifactId>
+                </exclusion>
+            </exclusions>
         </dependency>
 
         <dependency>
diff --git a/ipojo/runtime/core/pom.xml b/ipojo/runtime/core/pom.xml
index 4479c0e..c34a5bb 100644
--- a/ipojo/runtime/core/pom.xml
+++ b/ipojo/runtime/core/pom.xml
@@ -92,12 +92,12 @@
             <version>1.11.3-SNAPSHOT</version>
         </dependency>
         <dependency>
-            <groupId>asm</groupId>
+            <groupId>org.ow2.asm</groupId>
             <artifactId>asm-all</artifactId>
-            <version>3.3.1</version>
+            <version>5.0.2</version>
             <exclusions>
                 <exclusion>
-                    <groupId>asm</groupId>
+                    <groupId>org.ow2.asm</groupId>
                     <artifactId>asm-tree</artifactId>
                 </exclusion>
             </exclusions>
@@ -204,7 +204,7 @@
             <plugin>
                 <groupId>org.apache.felix</groupId>
                 <artifactId>maven-ipojo-plugin</artifactId>
-                <version>1.11.1</version>
+                <version>1.11.3-SNAPSHOT</version>
                 <executions>
                     <execution>
                         <goals>
diff --git a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/processor/ConfigurationAnnotationScanner.java b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/processor/ConfigurationAnnotationScanner.java
index 66f121d..b537e47 100644
--- a/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/processor/ConfigurationAnnotationScanner.java
+++ b/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/processor/ConfigurationAnnotationScanner.java
@@ -21,9 +21,9 @@
 
 import org.apache.felix.ipojo.configuration.Configuration;
 import org.objectweb.asm.AnnotationVisitor;
+import org.objectweb.asm.ClassVisitor;
 import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.Type;
-import org.objectweb.asm.commons.EmptyVisitor;
 
 /**
  * Class visitor detecting @Configuration annotation.
@@ -33,13 +33,17 @@
  * {@literal parent} is set to the parent class if and only if it's not a java.* class (which don't contain the
  * Configuration annotation) and {@literal isConfiguration} is set to false
  */
-public class ConfigurationAnnotationScanner extends EmptyVisitor implements Opcodes {
+public class ConfigurationAnnotationScanner extends ClassVisitor implements Opcodes {
 
     private static final String CONFIGURATION_ANNOTATION_DESCRIPTOR = Type.getType(Configuration.class)
             .getDescriptor();
     private boolean m_isConfiguration = false;
     private String m_super;
 
+    public ConfigurationAnnotationScanner() {
+        super(Opcodes.ASM5);
+    }
+
 
     @Override
     public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
@@ -59,7 +63,7 @@
     }
 
     public String getParent() {
-        if (m_super == null  || m_super.startsWith("java/") || m_isConfiguration) {
+        if (m_super == null || m_super.startsWith("java/") || m_isConfiguration) {
             return null;
         }
         return m_super.replace("/", ".");