Skip to content

Commit

Permalink
Update Guice to use cglib 3.2.9 & asm 7 in the opensource build, for …
Browse files Browse the repository at this point in the history
…better JDK11 compatibility.

Also remove the jdk10 build from Travis because it doesn't support it anymore and we don't really need it.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219129959
  • Loading branch information
sameb authored and ronshapiro committed Oct 29, 2018
1 parent c20d96d commit e1094c3
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 11 deletions.
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ cache:

jdk:
- oraclejdk11
- oraclejdk10
- oraclejdk9
- oraclejdk8
- openjdk7
Expand Down
6 changes: 3 additions & 3 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -279,13 +279,13 @@
<arg value="-DNO_AOP" />
</munge>
<replace file="build/no_aop/common.xml" value="">
<replacetoken><![CDATA[<zipfileset src="${common.basedir}/lib/build/asm-6.2.1.jar"/>]]></replacetoken>
<replacetoken><![CDATA[<zipfileset src="${common.basedir}/lib/build/asm-7.0.jar"/>]]></replacetoken>
</replace>
<replace file="build/no_aop/common.xml" value="">
<replacetoken><![CDATA[<zipfileset src="${common.basedir}/lib/build/cglib-3.2.8.jar"/>]]></replacetoken>
<replacetoken><![CDATA[<zipfileset src="${common.basedir}/lib/build/cglib-3.2.9.jar"/>]]></replacetoken>
</replace>
<replace file="build/no_aop/common.xml" value="">
<replacetoken><![CDATA[<zipfileset src="${common.basedir}/lib/build/cglib-3.2.8.jar"><include name="LICENSE"/><include name="NOTICE"/></zipfileset>]]></replacetoken>
<replacetoken><![CDATA[<zipfileset src="${common.basedir}/lib/build/cglib-3.2.9.jar"><include name="LICENSE"/><include name="NOTICE"/></zipfileset>]]></replacetoken>
</replace>
<replace file="build/no_aop/common.xml" value='Bundle-Name" value="$${ant.project.name} (no_aop)'>
<replacetoken><![CDATA[Bundle-Name" value="${ant.project.name}]]></replacetoken>
Expand Down
4 changes: 2 additions & 2 deletions common.xml
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,8 @@
classpath="${common.basedir}/lib/build/jarjar-1.1.jar"/>
<jarjar jarfile="${build.dir}/${ant.project.name}-with-deps.jar">
<fileset dir="${build.dir}/classes"/>
<zipfileset src="${common.basedir}/lib/build/cglib-3.2.8.jar"/>
<zipfileset src="${common.basedir}/lib/build/asm-6.2.1.jar"/>
<zipfileset src="${common.basedir}/lib/build/cglib-3.2.9.jar"/>
<zipfileset src="${common.basedir}/lib/build/asm-7.0.jar"/>
<rule pattern="net.sf.cglib.*" result="com.google.inject.internal.cglib.$@1"/>
<rule pattern="net.sf.cglib.**.*" result="com.google.inject.internal.cglib.@1.$@2"/>
<rule pattern="org.objectweb.asm.*" result="com.google.inject.internal.asm.$@1"/>
Expand Down
8 changes: 5 additions & 3 deletions core/src/com/google/inject/internal/util/LineNumbers.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
*/
final class LineNumbers {

private static final int ASM_API_LEVEL = Opcodes.ASM7;

private final Class type;
private final Map<String, Integer> lines = Maps.newHashMap();
private String source;
Expand Down Expand Up @@ -145,7 +147,7 @@ private class LineNumberReader extends ClassVisitor {
private String name;

LineNumberReader() {
super(Opcodes.ASM6);
super(ASM_API_LEVEL);
}

@Override
Expand Down Expand Up @@ -204,7 +206,7 @@ public AnnotationVisitor visitParameterAnnotation(int parameter, String desc, bo

class LineNumberMethodVisitor extends MethodVisitor {
LineNumberMethodVisitor() {
super(Opcodes.ASM6);
super(ASM_API_LEVEL);
}

@Override
Expand Down Expand Up @@ -235,7 +237,7 @@ public void visitLineNumber(int line, Label start) {

class LineNumberAnnotationVisitor extends AnnotationVisitor {
LineNumberAnnotationVisitor() {
super(Opcodes.ASM6);
super(ASM_API_LEVEL);
}

@Override
Expand Down
Binary file removed lib/build/asm-6.2.1.jar
Binary file not shown.
Binary file added lib/build/asm-7.0.jar
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ See the Apache License Version 2.0 for the specific language governing permissio
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>6.2.1</version>
<version>7.0</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>3.2.8</version>
<version>3.2.9</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down

0 comments on commit e1094c3

Please sign in to comment.