Projects
Eulaceura:Factory
jarjar
_service:obs_scm:port-to-asm6.patch
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:obs_scm:port-to-asm6.patch of Package jarjar
From f3be10509b9ae73ee97bee82cb6150b98d4a4595 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski <mizdebsk@redhat.com> Date: Mon, 18 Sep 2017 09:48:46 +0200 Subject: [PATCH] Port to ASM 6 --- src/main/com/tonicsystems/jarjar/DepFindVisitor.java | 2 +- src/main/com/tonicsystems/jarjar/EmptyClassVisitor.java | 8 ++++---- src/main/com/tonicsystems/jarjar/KeepProcessor.java | 2 +- src/main/com/tonicsystems/jarjar/StringReader.java | 8 ++++---- src/main/com/tonicsystems/jarjar/util/GetNameClassWriter.java | 2 +- .../com/tonicsystems/jarjar/util/RemappingClassTransformer.java | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/com/tonicsystems/jarjar/DepFindVisitor.java b/src/main/com/tonicsystems/jarjar/DepFindVisitor.java index 9d6611e..bad909e 100644 --- a/src/main/com/tonicsystems/jarjar/DepFindVisitor.java +++ b/src/main/com/tonicsystems/jarjar/DepFindVisitor.java @@ -25,7 +25,7 @@ import org.objectweb.asm.*; import org.objectweb.asm.Type; import org.objectweb.asm.commons.*; -class DepFindVisitor extends RemappingClassAdapter +class DepFindVisitor extends ClassRemapper { public DepFindVisitor(Map<String, String> classes, String source, DepHandler handler) throws IOException { super(null, new DepFindRemapper(classes, source, handler)); diff --git a/src/main/com/tonicsystems/jarjar/EmptyClassVisitor.java b/src/main/com/tonicsystems/jarjar/EmptyClassVisitor.java index 348e03d..7a758fe 100644 --- a/src/main/com/tonicsystems/jarjar/EmptyClassVisitor.java +++ b/src/main/com/tonicsystems/jarjar/EmptyClassVisitor.java @@ -28,23 +28,23 @@ import org.objectweb.asm.Opcodes; public class EmptyClassVisitor extends ClassVisitor { public EmptyClassVisitor() { - super(Opcodes.ASM4); + super(Opcodes.ASM6); } @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - return new MethodVisitor(Opcodes.ASM4) {}; + return new MethodVisitor(Opcodes.ASM6) {}; } @Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { - return new AnnotationVisitor(Opcodes.ASM4) {}; + return new AnnotationVisitor(Opcodes.ASM6) {}; } @Override public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) { - return new FieldVisitor(Opcodes.ASM4) {}; + return new FieldVisitor(Opcodes.ASM6) {}; } } diff --git a/src/main/com/tonicsystems/jarjar/KeepProcessor.java b/src/main/com/tonicsystems/jarjar/KeepProcessor.java index 0176b84..3ed4636 100644 --- a/src/main/com/tonicsystems/jarjar/KeepProcessor.java +++ b/src/main/com/tonicsystems/jarjar/KeepProcessor.java @@ -26,7 +26,7 @@ import org.objectweb.asm.commons.*; // TODO: this can probably be refactored into JarClassVisitor, etc. class KeepProcessor extends Remapper implements JarProcessor { - private final ClassVisitor cv = new RemappingClassAdapter(new EmptyClassVisitor(), this); + private final ClassVisitor cv = new ClassRemapper(new EmptyClassVisitor(), this); private final List<Wildcard> wildcards; private final List<String> roots = new ArrayList<String>(); private final Map<String, Set<String>> depend = new HashMap<String, Set<String>>(); diff --git a/src/main/com/tonicsystems/jarjar/StringReader.java b/src/main/com/tonicsystems/jarjar/StringReader.java index ba7bb29..5bb719c 100644 --- a/src/main/com/tonicsystems/jarjar/StringReader.java +++ b/src/main/com/tonicsystems/jarjar/StringReader.java @@ -24,7 +24,7 @@ abstract class StringReader extends ClassVisitor private String className; public StringReader() { - super(Opcodes.ASM4); + super(Opcodes.ASM6); } abstract public void visitString(String className, String value, int line); @@ -42,7 +42,7 @@ abstract class StringReader extends ClassVisitor public FieldVisitor visitField(int access, String name, String desc, String signature, Object value) { handleObject(value); - return new FieldVisitor(Opcodes.ASM4){ + return new FieldVisitor(Opcodes.ASM6){ @Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { return StringReader.this.visitAnnotation(desc, visible); @@ -52,7 +52,7 @@ abstract class StringReader extends ClassVisitor @Override public AnnotationVisitor visitAnnotation(String desc, boolean visible) { - return new AnnotationVisitor(Opcodes.ASM4) { + return new AnnotationVisitor(Opcodes.ASM6) { @Override public void visit(String name, Object value) { handleObject(value); @@ -71,7 +71,7 @@ abstract class StringReader extends ClassVisitor @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { - MethodVisitor mv = new MethodVisitor(Opcodes.ASM4){ + MethodVisitor mv = new MethodVisitor(Opcodes.ASM6){ @Override public void visitLdcInsn(Object cst) { handleObject(cst); diff --git a/src/main/com/tonicsystems/jarjar/util/GetNameClassWriter.java b/src/main/com/tonicsystems/jarjar/util/GetNameClassWriter.java index bbb8590..966ac82 100644 --- a/src/main/com/tonicsystems/jarjar/util/GetNameClassWriter.java +++ b/src/main/com/tonicsystems/jarjar/util/GetNameClassWriter.java @@ -25,7 +25,7 @@ public class GetNameClassWriter extends ClassVisitor private String className; public GetNameClassWriter(int flags) { - super(Opcodes.ASM4,new ClassWriter(flags)); + super(Opcodes.ASM6,new ClassWriter(flags)); } public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) { diff --git a/src/main/com/tonicsystems/jarjar/util/RemappingClassTransformer.java b/src/main/com/tonicsystems/jarjar/util/RemappingClassTransformer.java index fd1b9d7..9c1d4c9 100644 --- a/src/main/com/tonicsystems/jarjar/util/RemappingClassTransformer.java +++ b/src/main/com/tonicsystems/jarjar/util/RemappingClassTransformer.java @@ -17,12 +17,12 @@ package com.tonicsystems.jarjar.util; import org.objectweb.asm.ClassVisitor; +import org.objectweb.asm.commons.ClassRemapper; import org.objectweb.asm.commons.Remapper; -import org.objectweb.asm.commons.RemappingClassAdapter; import com.tonicsystems.jarjar.EmptyClassVisitor; -public class RemappingClassTransformer extends RemappingClassAdapter +public class RemappingClassTransformer extends ClassRemapper { public RemappingClassTransformer(Remapper pr) { super(new EmptyClassVisitor(), pr); -- 2.13.5
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2