Fix for 317127 eliminates some non-duplicate InnerClass attributes
The fix for 317127 ([1]) is buggy. When COMPUTE_FRAMES is enabled, the invocation of
`MethodWriter.visitMaxs` calls `ClassWriter.getMergetTypes`, which changes the value of
`ClassWriter.key2.intVal` (see [2])
A subsequent invocation of `ClassWriter.visitInnerClass` calls `newClassItem`, which creates a `new
Item(index++, key2)` ([3]). The `intVal` is copied from `key2`, therefore non-zero. However, the new
implementation of `visitInnerClass` expects it to be zero.
It works if `visitInnerClass` is invoked before emitting any methods. Test showing the difference is
available here: [4].
javac -cp /path/to/asm-all-5.0.2.jar PositionsClassDump.java -d .
java -cp /path/to/asm-all-5.0.2.jar:. test.PositionsClassDump
[1] http://websvn.ow2.org/comp.php?repname=asm&compare[]=%2F@1725&compare[]=%2F@1726
[2] https://github.com/lrytz/asm/blob/master/src/org/objectweb/asm/ClassWriter.java#L1654
[3] https://github.com/lrytz/asm/blob/master/src/org/objectweb/asm/ClassWriter.java#L1114
[4] https://gist.github.com/lrytz/32ead88e0024553d5584