Apparent regression in GeneratorAdapter.java `cast` function
Hi. The Clojure compiler uses your library to emit asm and we recently upgraded and have come across a change in behavior that I think might be erroneous.
Previously, the compiler would emit a call to cast
with from=Type.BYTE and to=TYPE.INT. This behavior is (I believe) a no-op and it would fall through the if-else structures as seen at https://gitlab.ow2.org/asm/asm/blob/d493987d57b981b21ba97d4226ee7b94b0dc8406/src/org/objectweb/asm/commons/GeneratorAdapter.java#L714.
However, this code now throws an error if it falls through the final if-else block as seen here: https://gitlab.ow2.org/asm/asm/blob/master/asm-commons/src/main/java/org/objectweb/asm/commons/GeneratorAdapter.java#L785. The commit that changed this had the message "Reformat the source code with google-java-format 1.3". and changed 262 files.
The result is that now a no-op cast needs to be guarded in the Clojure compiler. This isn't the end of the world I just wanted to see if this was an intentional change. My suspicion is that this change happened automatically and perhaps unintentionally.
More info can be found on the ticket for Clojure at https://dev.clojure.org/jira/browse/CLJ-2367
Thanks so much, Dan Sutton
Links: Previous version of GeneratorAdapter.java: https://gitlab.ow2.org/asm/asm/blob/d493987d57b981b21ba97d4226ee7b94b0dc8406/src/org/objectweb/asm/commons/GeneratorAdapter.java#L714
Current version: https://gitlab.ow2.org/asm/asm/blob/master/asm-commons/src/main/java/org/objectweb/asm/commons/GeneratorAdapter.java#L742
Commit that changed it: d493987d
Clojure ticket: https://dev.clojure.org/jira/browse/CLJ-2367