The Shrinking in Build Process Turns the Bytecode to Java 1.2
This bug was found when I was packaging Jack (Java Android Compiler Kit [1])
into Debian and I also submitted the bug to Debian's Bug Tracking System [2].
When compiling Jack, an error occured:
/android-toolchain-jack/jill/src/com/android/jill/frontend/java/MethodBodyWriter.java:196: error: type Analyzer does not take parameters private final Analyzer analyzer; ^
By looking at the source code [3] I found it referenced the generic type
`org.objectweb.asm.tree.analysis.Analyzer` which clearly has a type parameter,
however the compiler still complained. When I checked the file type of the
classes in `asm.jar` it gave me "compiled Java class data, version 46.0 (Java
1.2)". After I turned off the shrinking by adding `-Dproduct.noshrink=true` to
the build command as instructed in [4], Jack was compiled successfully and the
classes became Java 1.5.
I don't see anything mentioning that the shrink process would turn the Bytecode
into Java 1.2, so I am considering this a bug.
[1]: https://source.android.com/source/jack.html
[2]: https://bugs.debian.org/845606
[3]:
https://android.googlesource.com/toolchain/jack/+/ub-jack-douarn-b8/jill/src/com/android/jill/frontend/java/MethodBodyWriter.java#196
[4]: http://asm.ow2.org/doc/developer-guide.html#building