This is an automated email from the ASF dual-hosted git repository. mbenson pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-weaver.git
commit b3b4583a1b8981739a569e0ef89b7ac141ed2ea8 Author: Matt Benson <mben...@apache.org> AuthorDate: Fri Apr 20 15:28:05 2018 -0500 upgrade modules to ASM 6.1 --- LICENSE-asm5.1.txt => LICENSE-asm6.1.txt | 0 modules/normalizer/pom.xml | 44 ++---- modules/privilizer/weaver/pom.xml | 155 +++++++++------------ .../weaver/privilizer/BlueprintingVisitor.java | 3 +- pom.xml | 2 +- 5 files changed, 80 insertions(+), 124 deletions(-) diff --git a/LICENSE-asm5.1.txt b/LICENSE-asm6.1.txt similarity index 100% rename from LICENSE-asm5.1.txt rename to LICENSE-asm6.1.txt diff --git a/modules/normalizer/pom.xml b/modules/normalizer/pom.xml index 961b330..d6d408a 100644 --- a/modules/normalizer/pom.xml +++ b/modules/normalizer/pom.xml @@ -49,6 +49,18 @@ under the License. <scope>provided</scope> </dependency> <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm</artifactId> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-commons</artifactId> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-tree</artifactId> + </dependency> + <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> @@ -65,37 +77,6 @@ under the License. <scope>test</scope> </dependency> </dependencies> - <profiles> - <profile> - <id>basic</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <dependencies> - <dependency> - <groupId>org.ow2.asm</groupId> - <artifactId>asm</artifactId> - </dependency> - <dependency> - <groupId>org.ow2.asm</groupId> - <artifactId>asm-commons</artifactId> - </dependency> - <dependency> - <groupId>org.ow2.asm</groupId> - <artifactId>asm-tree</artifactId> - </dependency> - </dependencies> - </profile> - <profile> - <id>dev</id> - <dependencies> - <dependency> - <groupId>org.ow2.asm</groupId> - <artifactId>asm-debug-all</artifactId> - </dependency> - </dependencies> - </profile> - </profiles> <build> <plugins> <!-- shade plugin creates but does not clean ${project.basedir}/dependency-reduced-pom.xml --> @@ -237,7 +218,6 @@ under the License. </goals> <configuration> <includeArtifactIds>commons-lang3</includeArtifactIds> - <outputDirectory>${project.build.directory}/it/sample/lib</outputDirectory> </configuration> </execution> diff --git a/modules/privilizer/weaver/pom.xml b/modules/privilizer/weaver/pom.xml index 33b6cd1..b8e9301 100644 --- a/modules/privilizer/weaver/pom.xml +++ b/modules/privilizer/weaver/pom.xml @@ -47,99 +47,30 @@ under the License. <scope>provided</scope> </dependency> <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm</artifactId> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-commons</artifactId> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-tree</artifactId> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-util</artifactId> + </dependency> + <dependency> + <groupId>org.ow2.asm</groupId> + <artifactId>asm-analysis</artifactId> + </dependency> + <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> </dependency> </dependencies> - <profiles> - <profile> - <id>basic</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <dependencies> - <dependency> - <groupId>org.ow2.asm</groupId> - <artifactId>asm</artifactId> - </dependency> - <dependency> - <groupId>org.ow2.asm</groupId> - <artifactId>asm-commons</artifactId> - </dependency> - <dependency> - <groupId>org.ow2.asm</groupId> - <artifactId>asm-tree</artifactId> - </dependency> - <dependency> - <groupId>org.ow2.asm</groupId> - <artifactId>asm-util</artifactId> - </dependency> - <dependency> - <groupId>org.ow2.asm</groupId> - <artifactId>asm-analysis</artifactId> - </dependency> - </dependencies> - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-shade-plugin</artifactId> - <executions> - <execution> - <id>shade</id> - <goals> - <goal>shade</goal> - </goals> - <configuration> - <minimizeJar>true</minimizeJar> - <promoteTransitiveDependencies>true</promoteTransitiveDependencies> - <artifactSet> - <includes> - <include>org.apache.commons:commons-lang3</include> - <include>org.ow2.asm:*</include> - </includes> - </artifactSet> - <relocations> - <relocation> - <pattern>org.apache.commons.lang3.</pattern> - <shadedPattern>org.apache.commons.weaver.privilizer._lang3.</shadedPattern> - </relocation> - <relocation> - <pattern>org.objectweb.asm.</pattern> - <shadedPattern>org.apache.commons.weaver.privilizer._asm.</shadedPattern> - </relocation> - </relocations> - <filters> - <filter> - <artifact>org.apache.commons:commons-lang3</artifact> - <excludes> - <exclude>META-INF/**</exclude> - </excludes> - </filter> - <filter> - <artifact>org.ow2.asm:*</artifact> - <excludes> - <exclude>META-INF/**</exclude> - </excludes> - </filter> - </filters> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>dev</id> - <dependencies> - <dependency> - <groupId>org.ow2.asm</groupId> - <artifactId>asm-debug-all</artifactId> - </dependency> - </dependencies> - </profile> - </profiles> <build> <plugins> @@ -197,6 +128,52 @@ under the License. </filesets> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <executions> + <execution> + <id>shade</id> + <goals> + <goal>shade</goal> + </goals> + <configuration> + <minimizeJar>true</minimizeJar> + <promoteTransitiveDependencies>true</promoteTransitiveDependencies> + <artifactSet> + <includes> + <include>org.apache.commons:commons-lang3</include> + <include>org.ow2.asm:*</include> + </includes> + </artifactSet> + <relocations> + <relocation> + <pattern>org.apache.commons.lang3.</pattern> + <shadedPattern>org.apache.commons.weaver.privilizer._lang3.</shadedPattern> + </relocation> + <relocation> + <pattern>org.objectweb.asm.</pattern> + <shadedPattern>org.apache.commons.weaver.privilizer._asm.</shadedPattern> + </relocation> + </relocations> + <filters> + <filter> + <artifact>org.apache.commons:commons-lang3</artifact> + <excludes> + <exclude>META-INF/**</exclude> + </excludes> + </filter> + <filter> + <artifact>org.ow2.asm:*</artifact> + <excludes> + <exclude>META-INF/**</exclude> + </excludes> + </filter> + </filters> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> <reporting> diff --git a/modules/privilizer/weaver/src/main/java/org/apache/commons/weaver/privilizer/BlueprintingVisitor.java b/modules/privilizer/weaver/src/main/java/org/apache/commons/weaver/privilizer/BlueprintingVisitor.java index a12e79d..b306a39 100644 --- a/modules/privilizer/weaver/src/main/java/org/apache/commons/weaver/privilizer/BlueprintingVisitor.java +++ b/modules/privilizer/weaver/src/main/java/org/apache/commons/weaver/privilizer/BlueprintingVisitor.java @@ -161,8 +161,7 @@ class BlueprintingVisitor extends Privilizer.PrivilizerClassVisitor { final MethodNode source = getMethods(key.getLeft()).get(key.getRight()); - @SuppressWarnings("unchecked") - final String[] exceptions = ((List<String>) source.exceptions).toArray(ArrayUtils.EMPTY_STRING_ARRAY); + final String[] exceptions = source.exceptions.toArray(ArrayUtils.EMPTY_STRING_ARRAY); // non-public fields accessed final Set<FieldAccess> fieldAccesses = new LinkedHashSet<>(); diff --git a/pom.xml b/pom.xml index 73330bd..a7bc55d 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ under the License. <maven.compiler.target>1.8</maven.compiler.target> <ant.version>1.9.4</ant.version> - <asm.version>5.1</asm.version> + <asm.version>6.1</asm.version> </properties> <developers> -- To stop receiving notification emails like this one, please contact mben...@apache.org.