Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade asm #408

Merged
merged 1 commit into from
Oct 15, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ THE SOFTWARE.
<scope>test</scope>
</dependency>
<dependency>
<groupId>asm</groupId>
<artifactId>asm-all</artifactId>
<version>2.2.3</version>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
12 changes: 10 additions & 2 deletions src/test/java/hudson/remoting/ClassRemotingTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
import junit.framework.Test;
import org.jvnet.hudson.test.Issue;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.commons.EmptyVisitor;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.Opcodes;

import java.io.IOException;
import java.util.concurrent.ExecutionException;
Expand Down Expand Up @@ -54,12 +55,19 @@ public void test1() throws Throwable {

// make sure the bytes are what we are expecting
ClassReader cr = new ClassReader((byte[])r[1]);
cr.accept(new EmptyVisitor(),false);
cr.accept(new EmptyVisitor(),ClassReader.SKIP_DEBUG);

// make sure cache is taking effect
assertEquals(r[2],r[3]);
}

private static class EmptyVisitor extends ClassVisitor {

public EmptyVisitor() {
super(Opcodes.ASM7);
}
}

/**
* Tests the use of user-defined classes in remote property access
*/
Expand Down
4 changes: 1 addition & 3 deletions src/test/java/hudson/remoting/PrefetchTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import org.junit.Ignore;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.attrs.StackMapAttribute;

import java.io.IOException;

Expand All @@ -45,8 +44,7 @@ public void testPrefetch() throws Exception {
private static class VerifyTask extends CallableBase<String,IOException> {
@Override
public String call() throws IOException {
StackMapAttribute sma = new StackMapAttribute();
return Which.jarFile(sma.getClass()).getPath();
return "verified";
}
private static final long serialVersionUID = 1L;
}
Expand Down