You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@twill.apache.org by ch...@apache.org on 2020/01/15 22:54:54 UTC

[twill] 01/02: (TWILL-268) Upgrade to asm 7.1 to work with Java modules

This is an automated email from the ASF dual-hosted git repository.

chtyim pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/twill.git

commit c08a2c59b1426788e0c5d77dcc7aba1c8a2dde6e
Author: Terence Yim <te...@google.com>
AuthorDate: Wed Jan 15 10:44:52 2020 -0800

    (TWILL-268) Upgrade to asm 7.1 to work with Java modules
    
    This closes #85 on Github.
    
    Signed-off-by: Terence Yim <te...@google.com>
---
 pom.xml                                                        |  9 +++++++--
 twill-core/pom.xml                                             |  2 +-
 .../java/org/apache/twill/internal/utils/Dependencies.java     | 10 +++++-----
 twill-yarn/pom.xml                                             |  5 +++++
 4 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/pom.xml b/pom.xml
index 09a18fe..b76b1b3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -173,7 +173,7 @@
         <netty.version>4.1.16.Final</netty.version>
         <snappy-java.version>1.0.5</snappy-java.version>
         <jcl-over-slf4j.version>1.7.2</jcl-over-slf4j.version>
-        <asm.version>5.0.2</asm.version>
+        <asm.version>7.1</asm.version>
         <kafka.version>0.8.0</kafka.version>
         <zkclient.version>0.10</zkclient.version>
         <zookeeper.version>3.4.5</zookeeper.version>
@@ -729,7 +729,12 @@
             </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>
diff --git a/twill-core/pom.xml b/twill-core/pom.xml
index e0c482c..249c061 100644
--- a/twill-core/pom.xml
+++ b/twill-core/pom.xml
@@ -71,7 +71,7 @@
         </dependency>
         <dependency>
             <groupId>org.ow2.asm</groupId>
-            <artifactId>asm-all</artifactId>
+            <artifactId>asm</artifactId>
         </dependency>
         <dependency>
             <groupId>org.slf4j</groupId>
diff --git a/twill-core/src/main/java/org/apache/twill/internal/utils/Dependencies.java b/twill-core/src/main/java/org/apache/twill/internal/utils/Dependencies.java
index eb55557..d06062d 100644
--- a/twill-core/src/main/java/org/apache/twill/internal/utils/Dependencies.java
+++ b/twill-core/src/main/java/org/apache/twill/internal/utils/Dependencies.java
@@ -144,7 +144,7 @@ public final class Dependencies {
     private final DependencyAcceptor acceptor;
 
     public DependencyClassVisitor(DependencyAcceptor acceptor) {
-      super(Opcodes.ASM5);
+      super(Opcodes.ASM7);
       this.acceptor = acceptor;
       this.signatureVisitor = createSignatureVisitor();
       this.annotationVisitor = createAnnotationVisitor();
@@ -189,7 +189,7 @@ public final class Dependencies {
         addType(Type.getType(desc));
       }
 
-      return new FieldVisitor(Opcodes.ASM5) {
+      return new FieldVisitor(Opcodes.ASM7) {
         @Override
         public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
           if (!visible) {
@@ -210,7 +210,7 @@ public final class Dependencies {
       }
       addClasses(exceptions);
 
-      return new MethodVisitor(Opcodes.ASM5) {
+      return new MethodVisitor(Opcodes.ASM7) {
 
         @Override
         public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
@@ -315,7 +315,7 @@ public final class Dependencies {
      * Creates a {@link SignatureVisitor} for gathering dependency information from class signature.
      */
     private SignatureVisitor createSignatureVisitor() {
-      return new SignatureVisitor(Opcodes.ASM5) {
+      return new SignatureVisitor(Opcodes.ASM7) {
         private String currentClass;
 
         @Override
@@ -335,7 +335,7 @@ public final class Dependencies {
      * Creates an {@link AnnotationVisitor} for gathering dependency information from annotations.
      */
     private AnnotationVisitor createAnnotationVisitor() {
-      return new AnnotationVisitor(Opcodes.ASM5) {
+      return new AnnotationVisitor(Opcodes.ASM7) {
         @Override
         public void visit(String name, Object value) {
           if (value instanceof Type) {
diff --git a/twill-yarn/pom.xml b/twill-yarn/pom.xml
index c3816ab..508f0be 100644
--- a/twill-yarn/pom.xml
+++ b/twill-yarn/pom.xml
@@ -84,6 +84,11 @@
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
         </dependency>
+        <dependency>
+            <groupId>org.ow2.asm</groupId>
+            <artifactId>asm-commons</artifactId>
+            <scope>test</scope>
+        </dependency>
     </dependencies>
 
     <build>