This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/felix-dev.git
The following commit(s) were added to refs/heads/master by this push: new 032cb55d61 [FELIX-6502] Support 11+ java for ipojo (#129) 032cb55d61 is described below commit 032cb55d6109f3092ca1fa4a87d1449b5672cb25 Author: Alexander Shaklein <cheester...@gmail.com> AuthorDate: Thu Nov 30 15:44:23 2023 +0300 [FELIX-6502] Support 11+ java for ipojo (#129) Co-authored-by: Guillaume Nodet <gno...@gmail.com> --- ipojo/manipulator/annotations/pom.xml | 16 ++- ipojo/manipulator/bnd-ipojo-plugin/pom.xml | 15 +- ipojo/manipulator/ipojo-ant-task/pom.xml | 17 ++- ipojo/manipulator/manipulator-bom/pom.xml | 27 ++-- .../ipojo-manipulator-creation-test/pom.xml | 2 +- .../pom.xml | 2 +- .../ipojo-manipulator-manipulation-test/pom.xml | 2 +- .../manipulator-it/online-manipulator-it/pom.xml | 2 +- ipojo/manipulator/manipulator-it/pom.xml | 38 ++--- ipojo/manipulator/manipulator/pom.xml | 55 ++++++-- .../felix/ipojo/manipulation/ClassChecker.java | 25 +++- .../felix/ipojo/manipulation/ClassManipulator.java | 72 ++++++---- .../ipojo/manipulation/ConstructorCodeAdapter.java | 31 +++-- .../ipojo/manipulation/InnerClassAdapter.java | 2 +- .../ipojo/manipulation/InnerClassChecker.java | 2 +- .../felix/ipojo/manipulation/Manipulator.java | 10 ++ .../ipojo/manipulation/MethodCodeAdapter.java | 2 +- .../annotation/ClassMetadataCollector.java | 2 +- .../annotation/FieldMetadataCollector.java | 2 +- .../annotation/MethodMetadataCollector.java | 2 +- .../model/discovery/HandlerBindingDiscovery.java | 2 +- .../model/parser/AnnotationTypeVisitor.java | 2 +- .../model/parser/replay/AnnotationRecorder.java | 2 +- .../annotation/visitor/ComponentVisitor.java | 2 +- .../annotation/visitor/ControllerVisitor.java | 2 +- .../annotation/visitor/FieldPropertyVisitor.java | 2 +- .../visitor/HandlerDeclarationVisitor.java | 2 +- .../annotation/visitor/HandlerVisitor.java | 2 +- .../annotation/visitor/InstantiateVisitor.java | 2 +- .../annotation/visitor/LifecycleVisitor.java | 2 +- .../annotation/visitor/MethodPropertyVisitor.java | 2 +- .../visitor/PostRegistrationVisitor.java | 2 +- .../visitor/PostUnregistrationVisitor.java | 2 +- .../annotation/visitor/ProvidesVisitor.java | 6 +- .../annotation/visitor/RequiresVisitor.java | 2 +- .../visitor/ServiceControllerVisitor.java | 2 +- .../annotation/visitor/UpdatedVisitor.java | 2 +- .../visitor/bind/AbstractBindVisitor.java | 2 +- .../annotation/visitor/generic/GenericVisitor.java | 2 +- .../visitor/generic/SubArrayVisitor.java | 2 +- .../visitor/stereotype/FieldStereotypeVisitor.java | 2 +- .../stereotype/MethodStereotypeVisitor.java | 2 +- .../stereotype/ParameterStereotypeVisitor.java | 2 +- .../visitor/stereotype/TypeStereotypeVisitor.java | 2 +- .../manipulator/util/ChainedAnnotationVisitor.java | 2 +- .../ipojo/manipulation/ClassCheckerTestCase.java | 2 +- .../felix/ipojo/manipulation/ManipulatorTest.java | 153 +++++++++++++-------- .../src/test/java/test/InterfaceWithStatic.java | 33 +++++ .../src/test/java/test/PojoWithFinalArray.java | 34 +++++ .../test/java/test/PojoWithStaticInterface.java | 32 +++++ .../java/test/frames/CryptoServiceSingleton.java | 5 +- ipojo/manipulator/maven-ipojo-plugin/pom.xml | 52 ++++++- .../src/main/resources/archetype-resources/pom.xml | 2 +- ipojo/manipulator/online-manipulator/pom.xml | 34 +++-- ipojo/manipulator/pom.xml | 6 +- ipojo/metadata/pom.xml | 6 +- 56 files changed, 513 insertions(+), 226 deletions(-) diff --git a/ipojo/manipulator/annotations/pom.xml b/ipojo/manipulator/annotations/pom.xml index 636e2032d1..de6635c681 100644 --- a/ipojo/manipulator/annotations/pom.xml +++ b/ipojo/manipulator/annotations/pom.xml @@ -16,12 +16,11 @@ 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"> +<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 https://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> + <version>8</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>org.apache.felix.ipojo.annotations</artifactId> @@ -42,8 +41,15 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> - <source>1.5</source> - <target>1.5</target> + <source>8</source> + <target>8</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <additionalJOption>-Xdoclint:none</additionalJOption> </configuration> </plugin> </plugins> diff --git a/ipojo/manipulator/bnd-ipojo-plugin/pom.xml b/ipojo/manipulator/bnd-ipojo-plugin/pom.xml index 1ae769aa87..aba6d96909 100644 --- a/ipojo/manipulator/bnd-ipojo-plugin/pom.xml +++ b/ipojo/manipulator/bnd-ipojo-plugin/pom.xml @@ -17,13 +17,12 @@ ~ 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"> +<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.felix</groupId> <artifactId>felix-parent</artifactId> - <version>2.1</version> - <relativePath>../../../pom/pom.xml</relativePath> + <version>8</version> </parent> <artifactId>bnd-ipojo-plugin</artifactId> @@ -51,6 +50,12 @@ <version>1.8.5</version> <scope>test</scope> </dependency> + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.13.2</version> + <scope>test</scope> + </dependency> </dependencies> <dependencyManagement> @@ -71,8 +76,8 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> - <source>1.5</source> - <target>1.5</target> + <source>8</source> + <target>8</target> </configuration> </plugin> diff --git a/ipojo/manipulator/ipojo-ant-task/pom.xml b/ipojo/manipulator/ipojo-ant-task/pom.xml index 06813a44f0..66bbbc4ed0 100644 --- a/ipojo/manipulator/ipojo-ant-task/pom.xml +++ b/ipojo/manipulator/ipojo-ant-task/pom.xml @@ -16,12 +16,11 @@ 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"> +<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 https://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> + <version>8</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>org.apache.felix.ipojo.ant</artifactId> @@ -49,7 +48,7 @@ <dependency> <groupId>xerces</groupId> <artifactId>xercesImpl</artifactId> - <version>2.12.0</version> + <version>2.12.2</version> </dependency> <dependency> <groupId>ant</groupId> @@ -86,7 +85,7 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <version>2.3.7</version> + <version>5.1.9</version> <extensions>true</extensions> <configuration> <instructions> @@ -122,7 +121,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.10</version> <configuration> <enableRulesSummary>false</enableRulesSummary> <violationSeverity>warning</violationSeverity> @@ -161,6 +159,13 @@ </excludes> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <additionalJOption>-Xdoclint:none</additionalJOption> + </configuration> + </plugin> </plugins> </build> </project> diff --git a/ipojo/manipulator/manipulator-bom/pom.xml b/ipojo/manipulator/manipulator-bom/pom.xml index 0a6a8e9c12..d6fe1fdcf0 100644 --- a/ipojo/manipulator/manipulator-bom/pom.xml +++ b/ipojo/manipulator/manipulator-bom/pom.xml @@ -18,22 +18,21 @@ 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"> +<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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.felix</groupId> <artifactId>felix-parent</artifactId> - <version>2.1</version> - <relativePath>../../../pom/pom.xml</relativePath> + <version>8</version> </parent> <artifactId>ipojo-manipulator-bom</artifactId> - <version>1.12.2-SNAPSHOT</version> + <version>1.12.2-SNAPSHOT</version> <name>Apache Felix iPOJO Manipulator BOM</name> <packaging>pom</packaging> <properties> - <asm.version>5.0.2</asm.version> + <asm.version>9.6</asm.version> <metadata.version>1.6.0</metadata.version> </properties> @@ -51,14 +50,18 @@ </dependency> <dependency> <groupId>org.ow2.asm</groupId> - <artifactId>asm-all</artifactId> + <artifactId>asm</artifactId> + <version>${asm.version}</version> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-commons</artifactId> + <version>${asm.version}</version> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-util</artifactId> <version>${asm.version}</version> - <exclusions> - <exclusion> - <groupId>org.ow2.asm</groupId> - <artifactId>asm-tree</artifactId> - </exclusion> - </exclusions> </dependency> <dependency> <groupId>org.apache.felix</groupId> diff --git a/ipojo/manipulator/manipulator-it/ipojo-manipulator-creation-test/pom.xml b/ipojo/manipulator/manipulator-it/ipojo-manipulator-creation-test/pom.xml index 6e44f0918b..55c4418d77 100644 --- a/ipojo/manipulator/manipulator-it/ipojo-manipulator-creation-test/pom.xml +++ b/ipojo/manipulator/manipulator-it/ipojo-manipulator-creation-test/pom.xml @@ -18,7 +18,7 @@ ~ 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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.apache.felix</groupId> diff --git a/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-metadata-test/pom.xml b/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-metadata-test/pom.xml index f113d02e64..ecdb609c65 100644 --- a/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-metadata-test/pom.xml +++ b/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-metadata-test/pom.xml @@ -18,7 +18,7 @@ ~ 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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.apache.felix</groupId> diff --git a/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/pom.xml b/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/pom.xml index c96bfb1b8e..fed34b57c6 100644 --- a/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/pom.xml +++ b/ipojo/manipulator/manipulator-it/ipojo-manipulator-manipulation-test/pom.xml @@ -18,7 +18,7 @@ ~ 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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.apache.felix</groupId> diff --git a/ipojo/manipulator/manipulator-it/online-manipulator-it/pom.xml b/ipojo/manipulator/manipulator-it/online-manipulator-it/pom.xml index 5746a2e208..27e1a47a1c 100644 --- a/ipojo/manipulator/manipulator-it/online-manipulator-it/pom.xml +++ b/ipojo/manipulator/manipulator-it/online-manipulator-it/pom.xml @@ -18,7 +18,7 @@ ~ 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 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <groupId>org.apache.felix</groupId> diff --git a/ipojo/manipulator/manipulator-it/pom.xml b/ipojo/manipulator/manipulator-it/pom.xml index 0311b9d505..743100bb99 100644 --- a/ipojo/manipulator/manipulator-it/pom.xml +++ b/ipojo/manipulator/manipulator-it/pom.xml @@ -16,12 +16,11 @@ 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"> +<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 https://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> + <version>8</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -34,8 +33,8 @@ <!-- 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> + <exam.version>3.0.3</exam.version> + <url.version>1.5.2</url.version> <felix.version>4.4.0</felix.version> <equinox.version>3.9.0.v20130529-1710</equinox.version> @@ -66,17 +65,16 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>2.5.1</version> <configuration> - <source>1.7</source> - <target>1.7</target> + <source>1.8</source> + <target>1.8</target> </configuration> </plugin> <plugin> <groupId>org.apache.servicemix.tooling</groupId> <artifactId>depends-maven-plugin</artifactId> - <version>1.2</version> + <version>1.5.0</version> <executions> <execution> <id>generate-config</id> @@ -113,7 +111,6 @@ <plugin> <artifactId>maven-deploy-plugin</artifactId> - <version>2.4</version> <configuration> <skip>true</skip> </configuration> @@ -122,7 +119,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>2.15</version> <configuration> <skipTests>${skipTestExecution}</skipTests> <systemPropertyVariables> @@ -169,21 +165,21 @@ <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> - <version>1.2.0</version> + <version>1.2.12</version> <scope>test</scope> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> - <version>1.2.0</version> + <version>1.2.12</version> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.9</version> + <version>4.13.2</version> <scope>test</scope> </dependency> @@ -199,6 +195,12 @@ <version>1.0.0</version> </dependency> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.12.2</version> + </dependency> + <!-- The tiny bundle extension must be before the manipulator version to use the right version of the manipulator --> <dependency> @@ -246,7 +248,7 @@ <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> - <version>2.4</version> + <version>2.7</version> </dependency> <dependency> @@ -259,6 +261,10 @@ <groupId>org.osgi</groupId> <artifactId>org.osgi.core</artifactId> </exclusion> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-api</artifactId> + </exclusion> </exclusions> </dependency> @@ -324,7 +330,7 @@ <repositories> <repository> <id>knopflerfish-releases</id> - <url>http://www.knopflerfish.org/maven2</url> + <url>https://www.knopflerfish.org/maven2</url> </repository> </repositories> <dependencies> diff --git a/ipojo/manipulator/manipulator/pom.xml b/ipojo/manipulator/manipulator/pom.xml index e3ffa6b655..790f5c04ad 100644 --- a/ipojo/manipulator/manipulator/pom.xml +++ b/ipojo/manipulator/manipulator/pom.xml @@ -16,12 +16,11 @@ ~ 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"> +<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 https://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> + <version>8</version> </parent> <modelVersion>4.0.0</modelVersion> <packaging>bundle</packaging> @@ -35,13 +34,29 @@ <properties> <ipojo.import.packages>[1.12.1,2.0.0)</ipojo.import.packages> + <asm.version>9.6</asm.version> </properties> <dependencies> <dependency> <groupId>org.ow2.asm</groupId> - <artifactId>asm-all</artifactId> - <version>5.0.2</version> + <artifactId>asm</artifactId> + <version>${asm.version}</version> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-tree</artifactId> + <version>${asm.version}</version> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-commons</artifactId> + <version>${asm.version}</version> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-util</artifactId> + <version>${asm.version}</version> </dependency> <dependency> <groupId>org.apache.felix</groupId> @@ -68,7 +83,7 @@ <dependency> <groupId>commons-io</groupId> <artifactId>commons-io</artifactId> - <version>2.4</version> + <version>2.7</version> <scope>test</scope> </dependency> <dependency> @@ -82,7 +97,14 @@ <!-- used in some tests --> <groupId>commons-codec</groupId> <artifactId>commons-codec</artifactId> - <version>1.9</version> + <version>1.13</version> + <scope>test</scope> + </dependency> + + <dependency> + <groupId>junit</groupId> + <artifactId>junit</artifactId> + <version>4.13.2</version> <scope>test</scope> </dependency> </dependencies> @@ -97,7 +119,7 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <version>2.3.7</version> + <version>5.1.9</version> <extensions>true</extensions> <configuration> <instructions> @@ -119,7 +141,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.10</version> <configuration> <enableRulesSummary>false</enableRulesSummary> <violationSeverity>warning</violationSeverity> @@ -131,8 +152,8 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> - <source>1.6</source> - <target>1.6</target> + <source>8</source> + <target>8</target> </configuration> </plugin> @@ -160,7 +181,17 @@ </excludes> </configuration> </plugin> - + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <additionalJOption>-Xdoclint:none</additionalJOption> + </configuration> + </plugin> </plugins> </build> </project> 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 a83f0f7877..4e3646de38 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 @@ -46,6 +46,11 @@ public class ClassChecker extends ClassVisitor implements Opcodes { */ private Map<String, String> m_fields = new TreeMap<String, String>(); + /** + * Collection of final fields + */ + private Set<String> m_finalFields=new HashSet<>(); + /** * Method List of method descriptor discovered in the component class. */ @@ -73,7 +78,7 @@ public class ClassChecker extends ClassVisitor implements Opcodes { private int m_classVersion; public ClassChecker() { - super(Opcodes.ASM5); + super(Opcodes.ASM9); } /** @@ -117,6 +122,9 @@ public class ClassChecker extends ClassVisitor implements Opcodes { } else { m_fields.put(name, type.getClassName()); } + if ((access & ACC_FINAL) == ACC_FINAL) { + m_finalFields.add(name); + } return null; } @@ -300,6 +308,9 @@ public class ClassChecker extends ClassVisitor implements Opcodes { return m_fields; } + public Set<String> getFinalFields(){ + return m_finalFields; + } /** * Get collected methods. * @@ -345,7 +356,7 @@ public class ClassChecker extends ClassVisitor implements Opcodes { * @param md the method descriptor of the visited method. */ private MethodInfoCollector(MethodDescriptor md) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); m_method = md; } @@ -386,7 +397,7 @@ public class ClassChecker extends ClassVisitor implements Opcodes { m_method.addParameterAnnotation(id, ann); return ann; } - + /* * It is harmless to keep injected parameter annotations on original constructor * for correct property resolution in case of re-manipulation @@ -456,7 +467,7 @@ public class ClassChecker extends ClassVisitor implements Opcodes { * @param visible the visibility of the annotation at runtime */ public AnnotationDescriptor(String name, boolean visible) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); m_name = name; m_visible = visible; } @@ -469,7 +480,7 @@ public class ClassChecker extends ClassVisitor implements Opcodes { * @param desc the descriptor of the annotation */ public AnnotationDescriptor(String name, String desc) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); m_name = name; m_visible = true; m_desc = desc; @@ -641,7 +652,7 @@ public class ClassChecker extends ClassVisitor implements Opcodes { * @param name the name of the attribute. */ public ArrayAttribute(String name) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); m_name = name; } @@ -833,7 +844,7 @@ public class ClassChecker extends ClassVisitor implements Opcodes { private class InnerClassAssignedToStaticFieldDetector extends MethodVisitor { public InnerClassAssignedToStaticFieldDetector() { - super(Opcodes.ASM5); + super(Opcodes.ASM9); } @Override diff --git a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassManipulator.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassManipulator.java index de5fd3f70c..be509a82d9 100644 --- a/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassManipulator.java +++ b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulation/ClassManipulator.java @@ -19,18 +19,13 @@ package org.apache.felix.ipojo.manipulation; -import java.util.*; - import org.apache.felix.ipojo.manipulation.ClassChecker.AnnotationDescriptor; -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.*; import org.objectweb.asm.commons.GeneratorAdapter; import org.objectweb.asm.tree.LocalVariableNode; +import java.util.*; + /** * iPOJO Class Adapter. * This class adapt the visited class to link the class with the container. @@ -104,6 +99,11 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { */ private Set<String> m_fields; + /** + * Set of final fields detected in the class + */ + private Set<String> m_finalFields; + /** * List of methods contained in the class. * This set contains method id. @@ -141,9 +141,10 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { * @param manipulator : the manipulator having analyzed the class. */ public ClassManipulator(ClassVisitor visitor, Manipulator manipulator) { - super(Opcodes.ASM5, visitor); + super(Opcodes.ASM9, visitor); m_manipulator = manipulator; m_fields = manipulator.getFields().keySet(); + m_finalFields = manipulator.getFinalFields(); m_visitedMethods = manipulator.getMethods(); } @@ -208,7 +209,7 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { // Insert the new constructor MethodVisitor mv = super.visitMethod(ACC_PRIVATE, "<init>", newDesc, signature, exceptions); - return new ConstructorCodeAdapter(mv, m_owner, m_fields, ACC_PRIVATE, name, newDesc, m_superclass); + return new ConstructorCodeAdapter(mv, m_owner, m_fields, m_finalFields, ACC_PRIVATE, name, newDesc, m_superclass); } if ((access & ACC_SYNTHETIC) == ACC_SYNTHETIC && name.startsWith("access$")) { @@ -274,7 +275,7 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { */ public FieldVisitor visitField(final int access, final String name, final String desc, final String signature, final Object value) { if ((access & ACC_STATIC) == 0) { - FieldVisitor flag = cv.visitField(Opcodes.ACC_PRIVATE, FIELD_FLAG_PREFIX + name, "Z", null, null); + FieldVisitor flag = cv.visitField(ACC_PRIVATE, FIELD_FLAG_PREFIX + name, "Z", null, null); flag.visitEnd(); Type type = Type.getType(desc); @@ -285,7 +286,7 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { // Generates setter method String sDesc = "(" + desc + ")V"; - createArraySetter(name, sDesc); + createArraySetter(access, name, sDesc); } else { // Generate the getter method @@ -294,9 +295,8 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { // Generates setter method String sDesc = "(" + desc + ")V"; - createSimpleSetter(name, sDesc, type); + createSimpleSetter(access, name, sDesc, type); } - } return cv.visitField(access, name, desc, signature, value); } @@ -784,13 +784,14 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { /** * Create a getter method for an array. + * @param access * @param name : field name * @param desc : method description */ - private void createArraySetter(String name, String desc) { + private void createArraySetter(int access, String name, String desc) { MethodVisitor mv = cv.visitMethod(0, "__set" + name, desc, null, null); mv.visitCode(); - + boolean isFinal = (access & ACC_FINAL) == ACC_FINAL; String internalType = desc.substring(1); internalType = internalType.substring(0, internalType.length() - 2); @@ -801,9 +802,11 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { Label l2 = new Label(); mv.visitJumpInsn(IFNE, l2); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitFieldInsn(PUTFIELD, m_owner, name, internalType); + if(!isFinal) { + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitFieldInsn(PUTFIELD, m_owner, name, internalType); + } mv.visitInsn(RETURN); mv.visitLabel(l2); @@ -1045,13 +1048,15 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { /** * Create the setter method for one property. The name of the method is _set+name of the field + * @param access * @param name : name of the field representing a property * @param desc : description of the setter method * @param type : type of the property */ - private void createSimpleSetter(String name, String desc, Type type) { + private void createSimpleSetter(int access, String name, String desc, Type type) { MethodVisitor mv = cv.visitMethod(0, "__set" + name, desc, null, null); mv.visitCode(); + boolean isFinal = (access & ACC_FINAL) == ACC_FINAL; switch (type.getSort()) { case Type.BOOLEAN: @@ -1060,6 +1065,7 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { case Type.SHORT: case Type.INT: case Type.FLOAT: + String internalName = ManipulationProperty.PRIMITIVE_BOXING_INFORMATION[type.getSort()][0]; String boxingType = ManipulationProperty.PRIMITIVE_BOXING_INFORMATION[type.getSort()][1]; @@ -1070,10 +1076,11 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { mv.visitFieldInsn(GETFIELD, m_owner, FIELD_FLAG_PREFIX + name, "Z"); Label l22 = new Label(); mv.visitJumpInsn(IFNE, l22); - - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(type.getOpcode(ILOAD), 1); - mv.visitFieldInsn(PUTFIELD, m_owner, name, internalName); + if (!isFinal) { + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(type.getOpcode(ILOAD), 1); + mv.visitFieldInsn(PUTFIELD, m_owner, name, internalName); + } mv.visitInsn(RETURN); mv.visitLabel(l22); @@ -1083,6 +1090,7 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { mv.visitMethodInsn(INVOKESPECIAL, boxingType, "<init>", "(" + internalName + ")V", false); mv.visitVarInsn(ASTORE, 2); + Label l2 = new Label(); mv.visitLabel(l2); mv.visitVarInsn(ALOAD, 0); @@ -1111,9 +1119,11 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { Label l23 = new Label(); mv.visitJumpInsn(IFNE, l23); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(type.getOpcode(ILOAD), 1); - mv.visitFieldInsn(PUTFIELD, m_owner, name, internalName); + if(!isFinal) { + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(type.getOpcode(ILOAD), 1); + mv.visitFieldInsn(PUTFIELD, m_owner, name, internalName); + } mv.visitInsn(RETURN); mv.visitLabel(l23); @@ -1144,9 +1154,11 @@ public class ClassManipulator extends ClassVisitor implements Opcodes { Label l24 = new Label(); mv.visitJumpInsn(IFNE, l24); - mv.visitVarInsn(ALOAD, 0); - mv.visitVarInsn(ALOAD, 1); - mv.visitFieldInsn(PUTFIELD, m_owner, name, "L" + type.getInternalName() + ";"); + if (!isFinal) { + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 1); + mv.visitFieldInsn(PUTFIELD, m_owner, name, "L" + type.getInternalName() + ";"); + } mv.visitInsn(RETURN); mv.visitLabel(l24); 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 94b12056d0..097d9f887d 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 @@ -60,23 +60,30 @@ public class ConstructorCodeAdapter extends GeneratorAdapter implements Opcodes */ private Set<String> m_fields; + /** + * Set of contained final fields + */ + private Set<String> m_finalFields; + /** * PropertyCodeAdapter constructor. * A new FiledCodeAdapter should be create for each method visit. * - * @param mv the MethodVisitor - * @param owner the name of the class - * @param fields the list of contained fields - * @param access the constructor access - * @param desc the constructor descriptor - * @param name the name + * @param mv the MethodVisitor + * @param owner the name of the class + * @param fields the list of contained fields + * @param finalFields the list of contained final fields + * @param access the constructor access + * @param name the name + * @param desc the constructor descriptor */ - public ConstructorCodeAdapter(final MethodVisitor mv, final String owner, Set<String> fields, int access, String name, String desc, String superClass) { - super(Opcodes.ASM5, mv, access, name, desc); + public ConstructorCodeAdapter(final MethodVisitor mv, final String owner, Set<String> fields, Set<String> finalFields, int access, String name, String desc, String superClass) { + super(Opcodes.ASM9, mv, access, name, desc); m_owner = owner; m_superDetected = false; m_fields = fields; + m_finalFields = finalFields; m_superClass = superClass; } @@ -158,6 +165,12 @@ public class ConstructorCodeAdapter extends GeneratorAdapter implements Opcodes mv.visitMethodInsn(INVOKEVIRTUAL, owner, "__get" + name, gDesc, false); return; } else if (opcode == PUTFIELD) { + if (m_finalFields.contains(name)) { + mv.visitFieldInsn(PUTFIELD, owner, name, desc); + mv.visitVarInsn(ALOAD, 0); + mv.visitVarInsn(ALOAD, 0); + mv.visitFieldInsn(GETFIELD, owner, name, desc); + } String sDesc = "(" + desc + ")V"; mv.visitMethodInsn(INVOKEVIRTUAL, owner, "__set" + name, sDesc, false); return; @@ -200,7 +213,7 @@ public class ConstructorCodeAdapter extends GeneratorAdapter implements Opcodes "(Lorg/apache/felix/ipojo/InstanceManager;)V", false); } else { - if (opcode == INVOKEINTERFACE) { + if (opcode == INVOKEINTERFACE || (opcode == INVOKESTATIC && itf)) { mv.visitMethodInsn(opcode, owner, name, desc, true); } else { mv.visitMethodInsn(opcode, owner, name, desc, false); 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 ecdc9ef755..c437fcd867 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 @@ -72,7 +72,7 @@ public class InnerClassAdapter extends ClassVisitor implements Opcodes { */ public InnerClassAdapter(String name, ClassVisitor visitor, String outerClassName, Manipulator manipulator) { - super(Opcodes.ASM5, visitor); + super(Opcodes.ASM9, visitor); m_name = name; m_simpleName = m_name.substring(m_name.indexOf("$") + 1); m_outer = outerClassName; 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 886dea24e7..2fbbef8cad 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 @@ -34,7 +34,7 @@ public class InnerClassChecker extends ClassVisitor implements Opcodes { private final Manipulator m_manipulator; public InnerClassChecker(String name, Manipulator manipulator) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); 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 ba3a4e2779..de92381400 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 @@ -46,6 +46,11 @@ public class Manipulator { */ private Map<String, String> m_fields; + /** + * Store th visited final fields + */ + private Set<String> m_finalFields; + /** * Store the interface implemented by the class. */ @@ -101,6 +106,7 @@ public class Manipulator { is.close(); m_fields = ck.getFields(); // Get visited fields (contains only POJO fields) + m_finalFields = ck.getFinalFields(); m_className = ck.getClassName(); // Get interfaces and super class. @@ -219,6 +225,10 @@ public class Manipulator { return m_fields; } + public Set<String> getFinalFields(){ + return m_finalFields; + } + public List<MethodDescriptor> getMethods() { return m_methods; } 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 5b2402693c..09cc1ea621 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 @@ public class MethodCodeAdapter extends GeneratorAdapter implements Opcodes { * @param fields : Contained fields */ public MethodCodeAdapter(final MethodVisitor mv, final String owner, int access, String name, String desc, Set<String> fields) { - super(Opcodes.ASM5, mv, access, name, desc); + super(Opcodes.ASM9, mv, access, name, desc); m_owner = owner; m_fields = fields; } 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 73460496f7..632b8dd64d 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 @@ -58,7 +58,7 @@ public class ClassMetadataCollector extends ClassVisitor { private Element instanceMetadata; public ClassMetadataCollector(BindingRegistry registry, Reporter reporter) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.registry = registry; this.reporter = reporter; node = new ClassNode(); 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 638f778b91..184c714890 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 @@ -46,7 +46,7 @@ public class FieldMetadataCollector extends FieldVisitor { private FieldNode node; public FieldMetadataCollector(ComponentWorkbench workbench, FieldNode node) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); 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 556ba2ad9b..fed92f2a75 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 @@ -47,7 +47,7 @@ public class MethodMetadataCollector extends MethodVisitor { private MethodNode node; public MethodMetadataCollector(ComponentWorkbench workbench, MethodNode node, Reporter reporter) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); 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/model/discovery/HandlerBindingDiscovery.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/model/discovery/HandlerBindingDiscovery.java index 7c2249f98b..36c4058909 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 @@ -41,7 +41,7 @@ public class HandlerBindingDiscovery extends AnnotationVisitor implements Annota * Constructs a new {@link org.objectweb.asm.AnnotationVisitor}. */ public HandlerBindingDiscovery() { - super(Opcodes.ASM5); + super(Opcodes.ASM9); } public AnnotationVisitor visitAnnotation(final String desc) { 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 e0b4e58118..4d0fe580cc 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 @@ -34,7 +34,7 @@ public class AnnotationTypeVisitor extends ClassVisitor { private AnnotationType annotationType; public AnnotationTypeVisitor() { - super(Opcodes.ASM5); + super(Opcodes.ASM9); } @Override 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 cb0e812f93..c5b95746f4 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 @@ -33,7 +33,7 @@ public class AnnotationRecorder extends AnnotationVisitor implements Replay { private List<Replay> m_replays = new ArrayList<Replay>(); public AnnotationRecorder() { - super(Opcodes.ASM5); + super(Opcodes.ASM9); } public void visit(final String name, final Object value) { 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 20a35bd07e..2cc8c358cf 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 @@ -45,7 +45,7 @@ public class ComponentVisitor extends AnnotationVisitor { private ComponentWorkbench workbench; public ComponentVisitor(ComponentWorkbench workbench, Reporter reporter) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.workbench = workbench; this.reporter = reporter; } 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 88081f0f23..5f2cd814aa 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 @@ -37,7 +37,7 @@ public class ControllerVisitor extends AnnotationVisitor { private String field; public ControllerVisitor(ComponentWorkbench workbench, String field) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.workbench = workbench; this.field = field; } 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 1d6bec945e..6a8035e707 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 @@ -82,7 +82,7 @@ public class FieldPropertyVisitor extends AnnotationVisitor { * @param field : field name. */ public FieldPropertyVisitor(String field, Element parent) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); 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 2c5278362d..2b864943f3 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 @@ -53,7 +53,7 @@ public class HandlerDeclarationVisitor extends AnnotationVisitor { private Reporter reporter; public HandlerDeclarationVisitor(ComponentWorkbench workbench, DocumentBuilder builder, Reporter reporter) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.workbench = workbench; this.builder = builder; this.reporter = reporter; 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 ae9786113b..a41d6e93d9 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 @@ -41,7 +41,7 @@ public class HandlerVisitor extends AnnotationVisitor { private Reporter reporter; public HandlerVisitor(ComponentWorkbench workbench, Reporter reporter) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.workbench = workbench; this.reporter = reporter; } 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 7cf43cba76..d0445858cc 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 @@ -38,7 +38,7 @@ public class InstantiateVisitor extends AnnotationVisitor { private ComponentWorkbench workbench; public InstantiateVisitor(ComponentWorkbench workbench) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.workbench = workbench; } 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 08cf6601fb..3dfc5feddd 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 @@ -42,7 +42,7 @@ public class LifecycleVisitor extends AnnotationVisitor { private Transition transition; public LifecycleVisitor(ComponentWorkbench workbench, String name, Transition transition) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); 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 898c740864..c263bbf29d 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 @@ -73,7 +73,7 @@ public class MethodPropertyVisitor extends AnnotationVisitor { * @param method : attached method. */ public MethodPropertyVisitor(Element parent, String method) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); m_parent = parent; m_method = method; } 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 00a6c22394..1eebaecfcc 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 @@ -35,7 +35,7 @@ public class PostRegistrationVisitor extends AnnotationVisitor { private String name; public PostRegistrationVisitor(ComponentWorkbench workbench, String name) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.workbench = workbench; this.name = 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 cd24451af4..1022754b6d 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 @@ -35,7 +35,7 @@ public class PostUnregistrationVisitor extends AnnotationVisitor { private String name; public PostUnregistrationVisitor(ComponentWorkbench workbench, String name) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.workbench = workbench; this.name = 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 dcce9969e3..2e318c8ef6 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 @@ -42,7 +42,7 @@ public class ProvidesVisitor extends AnnotationVisitor { private Element m_prov = new Element("provides", ""); public ProvidesVisitor(ComponentWorkbench workbench) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.workbench = workbench; } @@ -75,7 +75,7 @@ public class ProvidesVisitor extends AnnotationVisitor { } 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 AnnotationVisitor(Opcodes.ASM5) { + return new AnnotationVisitor(Opcodes.ASM9) { public AnnotationVisitor visitAnnotation(String ignored, String desc) { return new FieldPropertyVisitor(m_prov); } @@ -104,7 +104,7 @@ public class ProvidesVisitor extends AnnotationVisitor { public InterfaceArrayVisitor() { - super(Opcodes.ASM5); + super(Opcodes.ASM9); } /** 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 9213949707..e23f5bb6dc 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 @@ -106,7 +106,7 @@ public class RequiresVisitor extends AnnotationVisitor { * @param name : field name. */ public RequiresVisitor(ComponentWorkbench workbench, String name) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.workbench = workbench; this.m_field = name; } 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 422bb9dd79..eceb7e53a3 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 @@ -48,7 +48,7 @@ public class ServiceControllerVisitor extends AnnotationVisitor { * @param field : field name. */ public ServiceControllerVisitor(String field, Element provides) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); 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 dd4b379174..dd1cf17330 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 @@ -36,7 +36,7 @@ public class UpdatedVisitor extends AnnotationVisitor { private String name; public UpdatedVisitor(ComponentWorkbench workbench, String name) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); 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 a00bed6990..2d4fbe3296 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 @@ -36,7 +36,7 @@ public abstract class AbstractBindVisitor extends AnnotationVisitor { protected Action action; public AbstractBindVisitor(ComponentWorkbench workbench, Action action) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.workbench = workbench; this.action = action; } 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 caf12169e1..d452b06542 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 @@ -35,7 +35,7 @@ public class GenericVisitor extends AnnotationVisitor { protected Element element; public GenericVisitor(Element element) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.element = element; } 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 6186382160..1d3da18fba 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 @@ -54,7 +54,7 @@ public class SubArrayVisitor extends AnnotationVisitor { * @param name : attribute name. */ public SubArrayVisitor(Element elem, String name) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); m_elem = elem; m_name = name; } 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 e63debeae7..0ad132624f 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 @@ -34,7 +34,7 @@ public class FieldStereotypeVisitor extends AnnotationVisitor { private final AnnotationType m_annotationType; public FieldStereotypeVisitor(final FieldVisitor delegate, AnnotationType annotationType) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); 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 716eec20d6..54ec56906b 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 @@ -34,7 +34,7 @@ public class MethodStereotypeVisitor extends AnnotationVisitor { private final AnnotationType m_annotationType; public MethodStereotypeVisitor(final MethodVisitor delegate, AnnotationType annotationType) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); 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 c766040b7b..afc7df4060 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 @@ -37,7 +37,7 @@ public class ParameterStereotypeVisitor extends AnnotationVisitor { private final AnnotationType m_annotationType; public ParameterStereotypeVisitor(final MethodVisitor delegate, final int index, AnnotationType annotationType) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); 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/TypeStereotypeVisitor.java b/ipojo/manipulator/manipulator/src/main/java/org/apache/felix/ipojo/manipulator/metadata/annotation/visitor/stereotype/TypeStereotypeVisitor.java index a2e9ee2bde..2f94c3626b 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 @@ -36,7 +36,7 @@ public class TypeStereotypeVisitor extends AnnotationVisitor { private final AnnotationType m_annotationType; public TypeStereotypeVisitor(final ClassVisitor delegate, AnnotationType annotationType) { - super(Opcodes.ASM5); + super(Opcodes.ASM9); this.m_delegate = delegate; m_annotationType = annotationType; } 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 f7da4e0deb..5fa4a81b10 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 @@ -35,7 +35,7 @@ public class ChainedAnnotationVisitor extends AnnotationVisitor { private List<AnnotationVisitor> m_visitors = new ArrayList<AnnotationVisitor>(); public ChainedAnnotationVisitor() { - super(Opcodes.ASM5); + super(Opcodes.ASM9); } public List<AnnotationVisitor> getVisitors() { 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 773a2a3244..c14627a0da 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 @@ -91,7 +91,7 @@ public class ClassCheckerTestCase extends TestCase { assertEquals(1, annotations.size()); ClassChecker.AnnotationDescriptor annotationDescriptor = annotations.get(0); MethodVisitor mv = mock(MethodVisitor.class); - when(mv.visitAnnotation(desc, true)).thenReturn(new AnnotationVisitor(Opcodes.ASM5) {}); + when(mv.visitAnnotation(desc, true)).thenReturn(new AnnotationVisitor(Opcodes.ASM9) {}); annotationDescriptor.visitAnnotation(mv); } diff --git a/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/ManipulatorTest.java b/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/ManipulatorTest.java index 03f9b4ad67..c12a082630 100644 --- a/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/ManipulatorTest.java +++ b/ipojo/manipulator/manipulator/src/test/java/org/apache/felix/ipojo/manipulation/ManipulatorTest.java @@ -19,24 +19,45 @@ package org.apache.felix.ipojo.manipulation; -import java.io.*; -import java.lang.reflect.Constructor; -import java.lang.reflect.Field; -import java.lang.reflect.Method; -import java.util.Arrays; - import junit.framework.Assert; import junit.framework.TestCase; - import org.apache.felix.ipojo.InstanceManager; import org.apache.felix.ipojo.Pojo; -import org.junit.Ignore; import org.mockito.Mockito; import org.objectweb.asm.ClassReader; import org.objectweb.asm.util.CheckClassAdapter; +import java.io.*; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.util.Arrays; + public class ManipulatorTest extends TestCase { + public static byte[] getBytesFromFile(File file) throws IOException { + InputStream is = new FileInputStream(file); + long length = file.length(); + byte[] bytes = new byte[(int) length]; + + // Read in the bytes + int offset = 0; + int numRead = 0; + while (offset < bytes.length + && (numRead = is.read(bytes, offset, bytes.length - offset)) >= 0) { + offset += numRead; + } + + // Ensure all the bytes have been read in + if (offset < bytes.length) { + throw new IOException("Could not completely read file " + file.getName()); + } + + // Close the input stream and return bytes + is.close(); + return bytes; + } + public void testClusterDaemon() throws Exception { Manipulator manipulator = new Manipulator(this.getClass().getClassLoader()); byte[] origin = getBytesFromFile(new File("target/test-classes/test/ClusterDaemon.class")); @@ -69,6 +90,7 @@ public class ManipulatorTest extends TestCase { manipulator.prepare(origin); byte[] clazz = manipulator.manipulate(origin); + ManipulatedClassLoader classloader = new ManipulatedClassLoader("test.frames.CryptoServiceSingleton", clazz); //Assert.assertNotNull(manipulator.getManipulationMetadata()); @@ -82,7 +104,9 @@ public class ManipulatorTest extends TestCase { Class cl = classloader.findClass("test.frames.CryptoServiceSingleton"); Assert.assertNotNull(cl); - Object instance = cl.newInstance(); + final Constructor constructor = cl.getDeclaredConstructor(); + constructor.setAccessible(true); + Object instance = constructor.newInstance(); Method method = cl.getMethod("encryptAESWithCBC", String.class, String.class); final String salt = "0000000000000000"; @@ -96,6 +120,45 @@ public class ManipulatorTest extends TestCase { } + public void testManipulatingPojoWithStaticInterface() throws Exception { + Manipulator manipulator = new Manipulator(this.getClass().getClassLoader()); + byte[] origin = getBytesFromFile(new File("target/test-classes/test/PojoWithStaticInterface.class")); + manipulator.prepare(origin); + byte[] clazz = manipulator.manipulate(origin); + ManipulatedClassLoader classloader = new ManipulatedClassLoader("test.PojoWithStaticInterface", clazz); + Class cl = classloader.findClass("test.PojoWithStaticInterface"); + Assert.assertNotNull(cl); + Assert.assertNotNull(manipulator.getManipulationMetadata()); + + final Constructor constructor = cl.getDeclaredConstructor(); + Assert.assertNotNull(constructor); + final Object instance = constructor.newInstance(); + Assert.assertNotNull(instance); + + Method method = cl.getMethod("doSomething", new Class[0]); + Assert.assertEquals(((String) method.invoke(instance, new Object[0])), "test"); + } + + public void testManipulatingPojoWithFinalArray() throws Exception { + Manipulator manipulator = new Manipulator(this.getClass().getClassLoader()); + byte[] origin = getBytesFromFile(new File("target/test-classes/test/PojoWithFinalArray.class")); + manipulator.prepare(origin); + byte[] clazz = manipulator.manipulate(origin); + + ManipulatedClassLoader classloader = new ManipulatedClassLoader("test.PojoWithFinalArray", clazz); + Class cl = classloader.findClass("test.PojoWithFinalArray"); + Assert.assertNotNull(cl); + Assert.assertNotNull(manipulator.getManipulationMetadata()); + + final Constructor constructor = cl.getDeclaredConstructor(); + Assert.assertNotNull(constructor); + final Object instance = constructor.newInstance(); + Assert.assertNotNull(instance); + + Method method = cl.getMethod("doSomething", new Class[0]); + Assert.assertEquals(((String) method.invoke(instance, new Object[0])), "test"); + } + public void testManipulatingTheSimplePojo() throws Exception { Manipulator manipulator = new Manipulator(this.getClass().getClassLoader()); byte[] origin = getBytesFromFile(new File("target/test-classes/test/SimplePojo.class")); @@ -117,7 +180,7 @@ public class ManipulatorTest extends TestCase { 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 && + if (csts[i].getParameterTypes().length == 1 && csts[i].getParameterTypes()[0].equals(InstanceManager.class)) { found = true; cst = csts[i]; @@ -140,7 +203,7 @@ public class ManipulatorTest extends TestCase { Assert.assertTrue(Arrays.asList(cl.getInterfaces()).contains(Pojo.class)); cst.setAccessible(true); - Object pojo = cst.newInstance(new Object[] {new InstanceManager()}); + Object pojo = cst.newInstance(new Object[]{new InstanceManager()}); Assert.assertNotNull(pojo); Assert.assertTrue(pojo instanceof Pojo); @@ -171,7 +234,7 @@ public class ManipulatorTest extends TestCase { 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 && + if (csts[i].getParameterTypes().length == 1 && csts[i].getParameterTypes()[0].equals(InstanceManager.class)) { found = true; cst = csts[i]; @@ -183,7 +246,7 @@ public class ManipulatorTest extends TestCase { Assert.assertTrue(Arrays.asList(cl.getInterfaces()).contains(Pojo.class)); cst.setAccessible(true); - Object pojo = cst.newInstance(new Object[] {new InstanceManager()}); + Object pojo = cst.newInstance(new Object[]{new InstanceManager()}); Assert.assertNotNull(pojo); Assert.assertTrue(pojo instanceof Pojo); @@ -208,7 +271,7 @@ public class ManipulatorTest extends TestCase { 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 && + if (csts[i].getParameterTypes().length == 1 && csts[i].getParameterTypes()[0].equals(InstanceManager.class)) { found = true; cst = csts[i]; @@ -232,7 +295,7 @@ public class ManipulatorTest extends TestCase { InstanceManager im = (InstanceManager) Mockito.mock(InstanceManager.class); cst.setAccessible(true); - Object pojo = cst.newInstance(new Object[] {im}); + Object pojo = cst.newInstance(new Object[]{im}); Assert.assertNotNull(pojo); Assert.assertTrue(pojo instanceof Pojo); @@ -256,7 +319,7 @@ public class ManipulatorTest extends TestCase { 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 && + if (csts[i].getParameterTypes().length == 1 && csts[i].getParameterTypes()[0].equals(InstanceManager.class)) { found = true; cst = csts[i]; @@ -276,7 +339,7 @@ public class ManipulatorTest extends TestCase { Assert.assertTrue(found); // Check that we have the IM, Integer, String constructor too - Constructor cst2 = cl.getDeclaredConstructor(new Class[] { InstanceManager.class, Integer.TYPE, String.class }); + Constructor cst2 = cl.getDeclaredConstructor(new Class[]{InstanceManager.class, Integer.TYPE, String.class}); Assert.assertNotNull(cst2); // Check the POJO interface @@ -286,7 +349,7 @@ public class ManipulatorTest extends TestCase { // Creation using cst InstanceManager im = (InstanceManager) Mockito.mock(InstanceManager.class); cst.setAccessible(true); - Object pojo = cst.newInstance(new Object[] {im}); + Object pojo = cst.newInstance(new Object[]{im}); Assert.assertNotNull(pojo); Assert.assertTrue(pojo instanceof Pojo); @@ -296,7 +359,7 @@ public class ManipulatorTest extends TestCase { // Try to create using cst2 im = (InstanceManager) Mockito.mock(InstanceManager.class); cst2.setAccessible(true); - pojo = cst2.newInstance(new Object[] {im, new Integer(2), "bariton"}); + pojo = cst2.newInstance(new Object[]{im, new Integer(2), "bariton"}); Assert.assertNotNull(pojo); Assert.assertTrue(pojo instanceof Pojo); @@ -304,10 +367,8 @@ public class ManipulatorTest extends TestCase { Assert.assertEquals(10, ((Integer) method.invoke(pojo, new Object[0])).intValue()); - } - public void testManipulatingWithNoValidConstructor() throws Exception { Manipulator manipulator = new Manipulator(this.getClass().getClassLoader()); byte[] origin = getBytesFromFile(new File("target/test-classes/test/NoValidConstructor.class")); @@ -329,7 +390,7 @@ public class ManipulatorTest extends TestCase { 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 && + if (csts[i].getParameterTypes().length == 1 && csts[i].getParameterTypes()[0].equals(InstanceManager.class)) { found = true; cst = csts[i]; @@ -341,17 +402,17 @@ public class ManipulatorTest extends TestCase { Assert.assertTrue(Arrays.asList(cl.getInterfaces()).contains(Pojo.class)); cst.setAccessible(true); - Object pojo = cst.newInstance(new Object[] {new InstanceManager()}); + Object pojo = cst.newInstance(new Object[]{new InstanceManager()}); Assert.assertNotNull(pojo); Assert.assertTrue(pojo instanceof Pojo); } - public void testConstructor() throws Exception { - Manipulator manipulator = new Manipulator(this.getClass().getClassLoader()); - byte[] origin = getBytesFromFile(new File("target/test-classes/test/ConstructorCheck.class")); - manipulator.prepare(origin); - byte[] clazz = manipulator.manipulate(origin); + public void testConstructor() throws Exception { + Manipulator manipulator = new Manipulator(this.getClass().getClassLoader()); + byte[] origin = getBytesFromFile(new File("target/test-classes/test/ConstructorCheck.class")); + manipulator.prepare(origin); + byte[] clazz = manipulator.manipulate(origin); // File out = new File("target/ManipulatedConstructorCheck.class"); // FileOutputStream fos = new FileOutputStream(out); @@ -365,13 +426,13 @@ public class ManipulatorTest extends TestCase { System.out.println(manipulator.getManipulationMetadata()); - Constructor c = cl.getConstructor(new Class[] {String.class }); + Constructor c = cl.getConstructor(new Class[]{String.class}); Assert.assertNotNull(c); Object o = c.newInstance("toto"); Field f = o.getClass().getField("m_foo"); Assert.assertEquals("toto", f.get(o)); - } + } /** * https://issues.apache.org/jira/browse/FELIX-3621 @@ -396,9 +457,9 @@ public class ManipulatorTest extends TestCase { boolean found = false; Constructor cst = null; Constructor[] csts = cl.getDeclaredConstructors(); - for(int i = 0; i < csts.length; i++) { + for (int i = 0; i < csts.length; i++) { System.out.println(Arrays.asList(csts[i].getParameterTypes())); - if (csts[i].getParameterTypes().length == 1 && + if (csts[i].getParameterTypes().length == 1 && csts[i].getParameterTypes()[0].equals(InstanceManager.class)) { found = true; cst = csts[i]; @@ -421,7 +482,7 @@ public class ManipulatorTest extends TestCase { Assert.assertTrue(Arrays.asList(cl.getInterfaces()).contains(Pojo.class)); cst.setAccessible(true); - Object pojo = cst.newInstance(new Object[] {new InstanceManager()}); + Object pojo = cst.newInstance(new Object[]{new InstanceManager()}); Assert.assertNotNull(pojo); Assert.assertTrue(pojo instanceof Pojo); @@ -431,30 +492,4 @@ public class ManipulatorTest extends TestCase { } - - public static byte[] getBytesFromFile(File file) throws IOException { - InputStream is = new FileInputStream(file); - long length = file.length(); - byte[] bytes = new byte[(int)length]; - - // Read in the bytes - int offset = 0; - int numRead = 0; - while (offset < bytes.length - && (numRead=is.read(bytes, offset, bytes.length-offset)) >= 0) { - offset += numRead; - } - - // Ensure all the bytes have been read in - if (offset < bytes.length) { - throw new IOException("Could not completely read file "+file.getName()); - } - - // Close the input stream and return bytes - is.close(); - return bytes; - } - - - } diff --git a/ipojo/manipulator/manipulator/src/test/java/test/InterfaceWithStatic.java b/ipojo/manipulator/manipulator/src/test/java/test/InterfaceWithStatic.java new file mode 100644 index 0000000000..85ea205e62 --- /dev/null +++ b/ipojo/manipulator/manipulator/src/test/java/test/InterfaceWithStatic.java @@ -0,0 +1,33 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package test; + +public interface InterfaceWithStatic { + static InterfaceWithStatic ofString(String string) { + return new InterfaceWithStatic() { + @Override + public String getString() { + return string; + } + }; + } + + String getString(); +} diff --git a/ipojo/manipulator/manipulator/src/test/java/test/PojoWithFinalArray.java b/ipojo/manipulator/manipulator/src/test/java/test/PojoWithFinalArray.java new file mode 100644 index 0000000000..2da51e8b34 --- /dev/null +++ b/ipojo/manipulator/manipulator/src/test/java/test/PojoWithFinalArray.java @@ -0,0 +1,34 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package test; + +public class PojoWithFinalArray { + + private final String[] strings = createInterfaces(); + + private String[] createInterfaces() { + return new String[]{"test"}; + } + + public String doSomething() { + return strings[0]; + } + +} diff --git a/ipojo/manipulator/manipulator/src/test/java/test/PojoWithStaticInterface.java b/ipojo/manipulator/manipulator/src/test/java/test/PojoWithStaticInterface.java new file mode 100644 index 0000000000..3fd80e61fb --- /dev/null +++ b/ipojo/manipulator/manipulator/src/test/java/test/PojoWithStaticInterface.java @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package test; + +public class PojoWithStaticInterface { + + private final InterfaceWithStatic intf = InterfaceWithStatic.ofString("test"); + + // This is a simple POJO + + public String doSomething() { + return intf.getString(); + } + +} diff --git a/ipojo/manipulator/manipulator/src/test/java/test/frames/CryptoServiceSingleton.java b/ipojo/manipulator/manipulator/src/test/java/test/frames/CryptoServiceSingleton.java index 62823fa341..660d15a634 100644 --- a/ipojo/manipulator/manipulator/src/test/java/test/frames/CryptoServiceSingleton.java +++ b/ipojo/manipulator/manipulator/src/test/java/test/frames/CryptoServiceSingleton.java @@ -7,9 +7,9 @@ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at - * + * * http://www.apache.org/licenses/LICENSE-2.0 - * + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. @@ -57,6 +57,7 @@ public class CryptoServiceSingleton { private Hash defaultHash; private final String secret; + private final String testField = "TEST"; public CryptoServiceSingleton(String secret, Hash defaultHash, Integer keySize, Integer iterationCount) { diff --git a/ipojo/manipulator/maven-ipojo-plugin/pom.xml b/ipojo/manipulator/maven-ipojo-plugin/pom.xml index 7f1b1da92a..a407339a04 100644 --- a/ipojo/manipulator/maven-ipojo-plugin/pom.xml +++ b/ipojo/manipulator/maven-ipojo-plugin/pom.xml @@ -20,8 +20,7 @@ <parent> <groupId>org.apache.felix</groupId> <artifactId>felix-parent</artifactId> - <version>2.1</version> - <relativePath>../../../pom/pom.xml</relativePath> + <version>8</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>maven-ipojo-plugin</artifactId> @@ -46,12 +45,12 @@ <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-archiver</artifactId> - <version>2.4.1</version> + <version>3.6.0</version> </dependency> <dependency> <groupId>org.codehaus.plexus</groupId> <artifactId>plexus-utils</artifactId> - <version>3.0.16</version> + <version>3.0.24</version> </dependency> <dependency> <groupId>org.apache.maven</groupId> @@ -88,10 +87,16 @@ <build> <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <additionalJOption>-Xdoclint:none</additionalJOption> + </configuration> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.10</version> <configuration> <enableRulesSummary>false</enableRulesSummary> <violationSeverity>warning</violationSeverity> @@ -102,8 +107,8 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> - <source>1.5</source> - <target>1.5</target> + <source>8</source> + <target>8</target> </configuration> </plugin> @@ -130,6 +135,10 @@ </excludes> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> </plugins> </build> @@ -141,6 +150,35 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <tags> + <tag> + <name>goal</name> + <placement>a</placement> + <head>Goal:</head> + </tag> + <tag> + <name>phase</name> + <placement>a</placement> + <head>Phase:</head> + </tag> + <tag> + <name>threadSafe</name> + <placement>a</placement> + <head>Thread Safe:</head> + </tag> + <tag> + <name>requiresDependencyResolution</name> + <placement>a</placement> + <head>Requires Dependency Resolution:</head> + </tag> + <tag> + <name>description</name> + <placement>a</placement> + <head>Description:</head> + </tag> + </tags> + </configuration> <executions> <execution> <id>attach-javadocs</id> diff --git a/ipojo/manipulator/maven-ipojo-plugin/src/main/resources/archetype-resources/pom.xml b/ipojo/manipulator/maven-ipojo-plugin/src/main/resources/archetype-resources/pom.xml index d27c0ea85a..c66de92d67 100644 --- a/ipojo/manipulator/maven-ipojo-plugin/src/main/resources/archetype-resources/pom.xml +++ b/ipojo/manipulator/maven-ipojo-plugin/src/main/resources/archetype-resources/pom.xml @@ -1,5 +1,5 @@ <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"> + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <packaging>bundle</packaging> <groupId>${groupId}</groupId> diff --git a/ipojo/manipulator/online-manipulator/pom.xml b/ipojo/manipulator/online-manipulator/pom.xml index f18bc5df0e..717ece5dfd 100644 --- a/ipojo/manipulator/online-manipulator/pom.xml +++ b/ipojo/manipulator/online-manipulator/pom.xml @@ -20,8 +20,7 @@ <parent> <groupId>org.apache.felix</groupId> <artifactId>felix-parent</artifactId> - <version>2.1</version> - <relativePath>../../../pom/pom.xml</relativePath> + <version>8</version> </parent> <modelVersion>4.0.0</modelVersion> <packaging>bundle</packaging> @@ -39,6 +38,7 @@ <properties> <ipojo.import.packages>[1.12.1,2.0.0)</ipojo.import.packages> <ipojo.manipulator.version>${project.version}</ipojo.manipulator.version> + <asm.version>9.6</asm.version> </properties> <dependencies> @@ -68,7 +68,23 @@ </dependency> <dependency> <groupId>org.ow2.asm</groupId> - <artifactId>asm-all</artifactId> + <artifactId>asm</artifactId> + <version>${asm.version}</version> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-tree</artifactId> + <version>${asm.version}</version> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-commons</artifactId> + <version>${asm.version}</version> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-util</artifactId> + <version>${asm.version}</version> </dependency> <dependency> <groupId>org.mockito</groupId> @@ -101,18 +117,17 @@ <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> + <target>8</target> + <source>8</source> + <testTarget>8</testTarget> + <testSource>8</testSource> </configuration> </plugin> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <version>2.3.7</version> + <version>5.1.9</version> <extensions>true</extensions> <configuration> <instructions> @@ -155,7 +170,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-checkstyle-plugin</artifactId> - <version>2.10</version> <configuration> <enableRulesSummary>false</enableRulesSummary> <violationSeverity>warning</violationSeverity> diff --git a/ipojo/manipulator/pom.xml b/ipojo/manipulator/pom.xml index 538fe6e86d..2511e0cc97 100644 --- a/ipojo/manipulator/pom.xml +++ b/ipojo/manipulator/pom.xml @@ -16,12 +16,11 @@ 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"> +<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 https://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> + <version>8</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>org.apache.felix.ipojo.manipulator-project</artifactId> @@ -55,7 +54,6 @@ <plugins> <plugin> <artifactId>maven-release-plugin</artifactId> - <version>2.5.1</version> <configuration> <tagBase>https://svn.apache.org/repos/asf/felix/releases</tagBase> <useReleaseProfile>false</useReleaseProfile> diff --git a/ipojo/metadata/pom.xml b/ipojo/metadata/pom.xml index 732cdc7fe4..e538d36c1e 100644 --- a/ipojo/metadata/pom.xml +++ b/ipojo/metadata/pom.xml @@ -40,7 +40,7 @@ <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> - <version>2.3.7</version> + <version>5.1.1</version> <extensions>true</extensions> <configuration> <instructions> @@ -58,8 +58,8 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> - <target>1.5</target> - <source>1.5</source> + <target>8</target> + <source>8</source> </configuration> </plugin> </plugins>