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

svn commit: r1592340 [1/3] - in /felix/trunk/ipojo: handler/temporal/temporal-dependency-handler/ manipulator/manipulator-bom/ manipulator/manipulator-it/ manipulator/manipulator-it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipo...

Author: clement
Date: Sun May  4 12:36:09 2014
New Revision: 1592340

URL: http://svn.apache.org/r1592340
Log:
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

Modified:
    felix/trunk/ipojo/handler/temporal/temporal-dependency-handler/pom.xml
    felix/trunk/ipojo/manipulator/manipulator-bom/pom.xml
    felix/trunk/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGetComponentInstance.java
    felix/trunk/ipojo/manipulator/manipulator-it/pom.xml
    felix/trunk/ipojo/manipulator/manipulator/pom.xml
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassAdapter.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassChecker.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCreator.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/ClassMetadataCollector.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/FieldMetadataCollector.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/MethodMetadataCollector.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/discovery/HandlerBindingDiscovery.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/parser/AnnotationTypeVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/parser/replay/AnnotationRecorder.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/module/DefaultBindingModule.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/LegacyGenericBindingRegistry.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistry.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/Selection.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ComponentVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ControllerVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/FieldPropertyVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/HandlerDeclarationVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/HandlerVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/InstantiateVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/LifecycleVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/MethodPropertyVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ParameterPropertyVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/PostRegistrationVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/PostUnregistrationVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ProvidesVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/RequiresVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/ServiceControllerVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/UpdatedVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/bind/AbstractBindVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/GenericVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/GenericVisitorFactory.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/generic/SubArrayVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/FieldStereotypeVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/MethodStereotypeVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/ParameterStereotypeVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/StereotypeVisitorFactory.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/TypeStereotypeVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/spi/BindingContext.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/spi/helper/Predicates.java
    felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/util/ChainedAnnotationVisitor.java
    felix/trunk/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/ClassCheckerTestCase.java
    felix/trunk/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/InnerClassAdapterTest.java
    felix/trunk/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/LegacyGenericBindingRegistryTestCase.java
    felix/trunk/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulator/metadata/annotation/registry/MetaAnnotationBindingRegistryTestCase.java
    felix/trunk/ipojo/manipulator/online-manipulator/pom.xml
    felix/trunk/ipojo/runtime/api/pom.xml
    felix/trunk/ipojo/runtime/core-it/ipojo-core-declaration-test/pom.xml
    felix/trunk/ipojo/runtime/core-it/ipojo-core-declaration-test/src/test/java/org/apache/felix/ipojo/runtime/core/test/declaration/TestDeclarationBuilderService.java
    felix/trunk/ipojo/runtime/core-it/pom.xml
    felix/trunk/ipojo/runtime/core/pom.xml
    felix/trunk/ipojo/runtime/core/src/main/java/org/apache/felix/ipojo/extender/internal/processor/ConfigurationAnnotationScanner.java

Modified: felix/trunk/ipojo/handler/temporal/temporal-dependency-handler/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/handler/temporal/temporal-dependency-handler/pom.xml?rev=1592340&r1=1592339&r2=1592340&view=diff
==============================================================================
--- felix/trunk/ipojo/handler/temporal/temporal-dependency-handler/pom.xml (original)
+++ felix/trunk/ipojo/handler/temporal/temporal-dependency-handler/pom.xml Sun May  4 12:36:09 2014
@@ -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>

Modified: felix/trunk/ipojo/manipulator/manipulator-bom/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/manipulator-bom/pom.xml?rev=1592340&r1=1592339&r2=1592340&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/manipulator-bom/pom.xml (original)
+++ felix/trunk/ipojo/manipulator/manipulator-bom/pom.xml Sun May  4 12:36:09 2014
@@ -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>

Modified: felix/trunk/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGetComponentInstance.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGetComponentInstance.java?rev=1592340&r1=1592339&r2=1592340&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGetComponentInstance.java (original)
+++ felix/trunk/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/src/test/java/org/apache/felix/ipojo/runtime/core/TestGetComponentInstance.java Sun May  4 12:36:09 2014
@@ -28,11 +28,14 @@ import org.junit.Test;
 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 @@ public class TestGetComponentInstance ex
      * 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 @@ public class TestGetComponentInstance ex
 
         // 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());

Modified: felix/trunk/ipojo/manipulator/manipulator-it/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/manipulator-it/pom.xml?rev=1592340&r1=1592339&r2=1592340&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/manipulator-it/pom.xml (original)
+++ felix/trunk/ipojo/manipulator/manipulator-it/pom.xml Sun May  4 12:36:09 2014
@@ -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>
+<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.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>
 
-  <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.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>
-
-      <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>
-    </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>
+    <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>
 </project>

Modified: felix/trunk/ipojo/manipulator/manipulator/pom.xml
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/manipulator/pom.xml?rev=1592340&r1=1592339&r2=1592340&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/manipulator/pom.xml (original)
+++ felix/trunk/ipojo/manipulator/manipulator/pom.xml Sun May  4 12:36:09 2014
@@ -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>

Modified: felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java?rev=1592340&r1=1592339&r2=1592340&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java (original)
+++ felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassChecker.java Sun May  4 12:36:09 2014
@@ -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 @@ public class ClassChecker extends EmptyV
     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 @@ public class ClassChecker extends EmptyV
     /**
      * 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 @@ public class ClassChecker extends EmptyV
 
     /**
      * Check if the class was already manipulated.
+     *
      * @return true if the class is already manipulated.
      */
     public boolean isAlreadyManipulated() {
@@ -163,6 +158,7 @@ public class ClassChecker extends EmptyV
 
     /**
      * Gets the extracted class version
+     *
      * @return the class version.
      */
     public int getClassVersion() {
@@ -172,21 +168,21 @@ public class ClassChecker extends EmptyV
     /**
      * 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 @@ public class ClassChecker extends EmptyV
     /**
      * 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 @@ public class ClassChecker extends EmptyV
 
     /**
      * Get collected interfaces.
+     *
      * @return the interfaces implemented by the component class.
      */
     public List<String> getInterfaces() {
@@ -295,6 +293,7 @@ public class ClassChecker extends EmptyV
 
     /**
      * Get collected fields.
+     *
      * @return the field map [field_name, type].
      */
     public Map<String, String> getFields() {
@@ -303,6 +302,7 @@ public class ClassChecker extends EmptyV
 
     /**
      * Get collected methods.
+     *
      * @return the method list of [method, signature].
      */
     public List<MethodDescriptor> getMethods() {
@@ -330,9 +330,10 @@ public class ClassChecker extends EmptyV
      * 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 @@ public class ClassChecker extends EmptyV
 
         /**
          * 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 @@ public class ClassChecker extends EmptyV
          * 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 class ClassChecker extends EmptyV
         }
 
         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 @@ public class ClassChecker extends EmptyV
              * 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 @@ public class ClassChecker extends EmptyV
      * {@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 @@ public class ClassChecker extends EmptyV
         /**
          * 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 @@ public class ClassChecker extends EmptyV
         /**
          * 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 @@ public class ClassChecker extends EmptyV
 
         /**
          * 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 @@ public class ClassChecker extends EmptyV
 
         /**
          * 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 @@ public class ClassChecker extends EmptyV
 
         /**
          * 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 @@ public class ClassChecker extends EmptyV
 
         /**
          * 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 @@ public class ClassChecker extends EmptyV
          * 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 @@ public class ClassChecker extends EmptyV
          * 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 @@ public class ClassChecker extends EmptyV
          * 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 @@ public class ClassChecker extends EmptyV
      * 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 @@ public class ClassChecker extends EmptyV
 
         /**
          * 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 @@ public class ClassChecker extends EmptyV
         /**
          * 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 @@ public class ClassChecker extends EmptyV
         /**
          * 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 @@ public class ClassChecker extends EmptyV
 
         /**
          * 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 @@ public class ClassChecker extends EmptyV
          * 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 @@ public class ClassChecker extends EmptyV
      * 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 @@ public class ClassChecker extends EmptyV
 
         /**
          * 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 @@ public class ClassChecker extends EmptyV
 
         /**
          * 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 @@ public class ClassChecker extends EmptyV
      * 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 @@ public class ClassChecker extends EmptyV
 
         /**
          * 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 @@ public class ClassChecker extends EmptyV
 
         /**
          * 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 @@ public class ClassChecker extends EmptyV
     /**
      * 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);
             }
         }

Modified: felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java?rev=1592340&r1=1592339&r2=1592340&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java (original)
+++ felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ConstructorCodeAdapter.java Sun May  4 12:36:09 2014
@@ -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.MethodVisitor;
 import org.objectweb.asm.Opcodes;
 import org.objectweb.asm.commons.GeneratorAdapter;
 
+import java.util.Set;
+
 
 /**
  * Constructor Adapter.
@@ -73,7 +73,7 @@ public class ConstructorCodeAdapter exte
      * @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 @@ public class ConstructorCodeAdapter exte
      * @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 @@ public class ConstructorCodeAdapter exte
         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 @@ public class ConstructorCodeAdapter exte
      * @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 @@ public class ConstructorCodeAdapter exte
 
             //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 @@ public class ConstructorCodeAdapter exte
      *
      * @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 @@ public class ConstructorCodeAdapter exte
      *
      * @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 @@ public class ConstructorCodeAdapter exte
      * @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 @@ public class ConstructorCodeAdapter exte
      *
      * @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);

Modified: felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassAdapter.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassAdapter.java?rev=1592340&r1=1592339&r2=1592340&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassAdapter.java (original)
+++ felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassAdapter.java Sun May  4 12:36:09 2014
@@ -23,7 +23,6 @@ import org.objectweb.asm.*;
 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 @@ import java.util.Set;
  *
  * @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 @@ public class InnerClassAdapter extends C
      * 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 @@ public class InnerClassAdapter extends C
         // 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 @@ public class InnerClassAdapter extends C
      * @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 @@ public class InnerClassAdapter extends C
 
         // 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 @@ public class InnerClassAdapter extends C
 
         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 @@ public class InnerClassAdapter extends C
         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 @@ public class InnerClassAdapter extends C
         } 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 @@ public class InnerClassAdapter extends C
         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 @@ public class InnerClassAdapter extends C
 
         // 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);
                 }
             }

Modified: felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassChecker.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassChecker.java?rev=1592340&r1=1592339&r2=1592340&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassChecker.java (original)
+++ felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/InnerClassChecker.java Sun May  4 12:36:09 2014
@@ -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;
     }

Modified: felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java?rev=1592340&r1=1592339&r2=1592340&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java (original)
+++ felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/Manipulator.java Sun May  4 12:36:09 2014
@@ -117,17 +117,17 @@ public class Manipulator {
     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;
         }

Modified: felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java
URL: http://svn.apache.org/viewvc/felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java?rev=1592340&r1=1592339&r2=1592340&view=diff
==============================================================================
--- felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java (original)
+++ felix/trunk/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/MethodCodeAdapter.java Sun May  4 12:36:09 2014
@@ -53,7 +53,7 @@ public class MethodCodeAdapter extends G
      * @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 @@ public class MethodCodeAdapter extends G
         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 @@ public class MethodCodeAdapter extends G
      * @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 @@ public class MethodCodeAdapter extends G
      * @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);
         }
     }