diff options
author | Deepanshu Gupta <deepanshu@google.com> | 2014-04-08 22:47:44 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-04-08 22:47:45 +0000 |
commit | 6e5e160f19c404c272e70f7f0ade5b27850ebd05 (patch) | |
tree | 07ce55e46657506b8fbc5b0896998e44cb79af8c /tools | |
parent | 18c7f559a02d3c1a250ecb0aebcd76d5291110b9 (diff) | |
parent | 6a08225cee197e5baf80dd06dae46988db284122 (diff) | |
download | frameworks_base-6e5e160f19c404c272e70f7f0ade5b27850ebd05.zip frameworks_base-6e5e160f19c404c272e70f7f0ade5b27850ebd05.tar.gz frameworks_base-6e5e160f19c404c272e70f7f0ade5b27850ebd05.tar.bz2 |
Merge "Make layoutlib load on Java 7 VM"
Diffstat (limited to 'tools')
-rw-r--r-- | tools/layoutlib/create/.classpath | 2 | ||||
-rw-r--r-- | tools/layoutlib/create/src/com/android/tools/layoutlib/create/AbstractClassAdapter.java | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/tools/layoutlib/create/.classpath b/tools/layoutlib/create/.classpath index cd8bb0d..25c3b3e 100644 --- a/tools/layoutlib/create/.classpath +++ b/tools/layoutlib/create/.classpath @@ -4,6 +4,6 @@ <classpathentry excluding="mock_data/" kind="src" path="tests"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/> - <classpathentry kind="var" path="ANDROID_SRC/prebuilts/tools/common/asm-tools/asm-4.0.jar" sourcepath="/ANDROID_PLAT/prebuilts/tools/common/asm-tools/src-4.0.zip"/> + <classpathentry kind="var" path="ANDROID_PLAT_SRC/prebuilts/misc/common/asm/asm-4.0.jar" sourcepath="/ANDROID_PLAT_SRC/prebuilts/misc/common/asm/src.zip"/> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AbstractClassAdapter.java b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AbstractClassAdapter.java index b2caa25..323a791 100644 --- a/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AbstractClassAdapter.java +++ b/tools/layoutlib/create/src/com/android/tools/layoutlib/create/AbstractClassAdapter.java @@ -177,6 +177,17 @@ public abstract class AbstractClassAdapter extends ClassVisitor { } } + /* Java 7 verifies the StackMapTable of a class if its version number is greater than 50.0. + * However, the check is disabled if the class version number is 50.0 or less. Generation + * of the StackMapTable requires a rewrite using the tree API of ASM. As a workaround, + * we rewrite the version number of the class to be 50.0 + * + * http://bugs.java.com/bugdatabase/view_bug.do?bug_id=6693236 + */ + if (version > 50) { + version = 50; + } + super.visit(version, access, name, signature, superName, interfaces); } |