Skip to content

Commit

Permalink
[FLINK-12390][build] Fully migrate to flink-shaded-asm-6
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed May 3, 2019
1 parent ac5640a commit 9975e03
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 41 deletions.
2 changes: 1 addition & 1 deletion flink-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ under the License.

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-asm</artifactId>
<artifactId>flink-shaded-asm-6</artifactId>
</dependency>

<!-- standard utilities -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import java.util.Collections;
import java.util.List;

import static org.apache.flink.shaded.asm5.org.objectweb.asm.Type.getConstructorDescriptor;
import static org.apache.flink.shaded.asm5.org.objectweb.asm.Type.getMethodDescriptor;
import static org.apache.flink.shaded.asm6.org.objectweb.asm.Type.getConstructorDescriptor;
import static org.apache.flink.shaded.asm6.org.objectweb.asm.Type.getMethodDescriptor;

@Internal
public class TypeExtractionUtils {
Expand Down
5 changes: 0 additions & 5 deletions flink-java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,6 @@ under the License.
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-asm</artifactId>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-asm-6</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ class This0AccessFinder extends ClassVisitor {
private boolean isThis0Accessed;

public This0AccessFinder(String this0Name) {
super(Opcodes.ASM5);
super(Opcodes.ASM6);
this.this0Name = this0Name;
}

Expand All @@ -186,7 +186,7 @@ public boolean isThis0Accessed() {

@Override
public MethodVisitor visitMethod(int access, String name, String desc, String sig, String[] exceptions) {
return new MethodVisitor(Opcodes.ASM5) {
return new MethodVisitor(Opcodes.ASM6) {

@Override
public void visitFieldInsn(int op, String owner, String name, String desc) {
Expand Down
2 changes: 1 addition & 1 deletion flink-runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ under the License.

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-asm</artifactId>
<artifactId>flink-shaded-asm-6</artifactId>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@

package org.apache.flink.runtime.util;

import org.apache.flink.shaded.asm5.org.objectweb.asm.AnnotationVisitor;
import org.apache.flink.shaded.asm5.org.objectweb.asm.ClassVisitor;
import org.apache.flink.shaded.asm5.org.objectweb.asm.Opcodes;
import org.apache.flink.shaded.asm5.org.objectweb.asm.FieldVisitor;
import org.apache.flink.shaded.asm5.org.objectweb.asm.MethodVisitor;
import org.apache.flink.shaded.asm5.org.objectweb.asm.Type;
import org.apache.flink.shaded.asm5.org.objectweb.asm.TypePath;
import org.apache.flink.shaded.asm5.org.objectweb.asm.Label;
import org.apache.flink.shaded.asm5.org.objectweb.asm.signature.SignatureReader;
import org.apache.flink.shaded.asm5.org.objectweb.asm.signature.SignatureVisitor;
import org.apache.flink.shaded.asm6.org.objectweb.asm.AnnotationVisitor;
import org.apache.flink.shaded.asm6.org.objectweb.asm.ClassVisitor;
import org.apache.flink.shaded.asm6.org.objectweb.asm.Opcodes;
import org.apache.flink.shaded.asm6.org.objectweb.asm.FieldVisitor;
import org.apache.flink.shaded.asm6.org.objectweb.asm.MethodVisitor;
import org.apache.flink.shaded.asm6.org.objectweb.asm.Type;
import org.apache.flink.shaded.asm6.org.objectweb.asm.TypePath;
import org.apache.flink.shaded.asm6.org.objectweb.asm.Label;
import org.apache.flink.shaded.asm6.org.objectweb.asm.signature.SignatureReader;
import org.apache.flink.shaded.asm6.org.objectweb.asm.signature.SignatureVisitor;

import java.util.HashSet;
import java.util.Set;
Expand Down Expand Up @@ -66,7 +66,7 @@ public void visit(int version, int access, String name, String signature, String
@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
addDesc(desc);
return new AnnotationVisitorImpl(Opcodes.ASM5);
return new AnnotationVisitorImpl(Opcodes.ASM6);
}

@Override
Expand All @@ -79,7 +79,7 @@ public FieldVisitor visitField(int access, String name, String desc, String sign
if (value instanceof Type) {
addType((Type) value);
}
return new FieldVisitorImpl(Opcodes.ASM5);
return new FieldVisitorImpl(Opcodes.ASM6);
}

@Override
Expand All @@ -90,7 +90,7 @@ public MethodVisitor visitMethod(int access, String name, String desc, String si
addSignature(signature);
}
addInternalNames(exceptions);
return new MethodVisitorImpl(Opcodes.ASM5);
return new MethodVisitorImpl(Opcodes.ASM6);
}

// ---------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -154,13 +154,13 @@ private void addType(Type t) {

private void addSignature(String signature) {
if (signature != null) {
new SignatureReader(signature).accept(new SignatureVisitorImpl(Opcodes.ASM5));
new SignatureReader(signature).accept(new SignatureVisitorImpl(Opcodes.ASM6));
}
}

private void addTypeSignature(String signature) {
if (signature != null) {
new SignatureReader(signature).acceptType(new SignatureVisitorImpl(Opcodes.ASM5));
new SignatureReader(signature).acceptType(new SignatureVisitorImpl(Opcodes.ASM6));
}
}

Expand All @@ -173,7 +173,7 @@ public MethodVisitorImpl(int api) {
@Override
public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, boolean visible) {
addDesc(desc);
return new AnnotationVisitorImpl(Opcodes.ASM5);
return new AnnotationVisitorImpl(Opcodes.ASM6);
}

@Override
Expand Down Expand Up @@ -222,13 +222,13 @@ public void visitLocalVariable(String name, String desc, String signature, Label

@Override
public AnnotationVisitor visitAnnotationDefault() {
return new AnnotationVisitorImpl(Opcodes.ASM5);
return new AnnotationVisitorImpl(Opcodes.ASM6);
}

@Override
public AnnotationVisitor visitAnnotation(String desc, boolean visible) {
addDesc(desc);
return new AnnotationVisitorImpl(Opcodes.ASM5);
return new AnnotationVisitorImpl(Opcodes.ASM6);
}

@Override
Expand Down Expand Up @@ -277,7 +277,7 @@ public FieldVisitorImpl(int api) {
@Override
public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String desc, boolean visible) {
addDesc(desc);
return new AnnotationVisitorImpl(Opcodes.ASM5);
return new AnnotationVisitorImpl(Opcodes.ASM6);
}
}

Expand Down
5 changes: 0 additions & 5 deletions flink-scala/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ under the License.
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-asm</artifactId>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-asm-6</artifactId>
Expand Down
6 changes: 0 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,6 @@ under the License.
-->
<dependencies>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-asm</artifactId>
<version>5.0.4-${flink.shaded.version}</version>
</dependency>

<dependency>
<groupId>org.apache.flink</groupId>
<artifactId>flink-shaded-asm-6</artifactId>
Expand Down

0 comments on commit 9975e03

Please sign in to comment.