getSimpleName considered harmful (bp #1228) (#1254)
* Use getName instead of getSimpleName This changes uses of `getSimpleName` to `getName`. The former throws idiotic exceptions under Java 8, e.g., `getSimpleName` will fail if used on a class inside an object. This fixes a bug where any call to the `name` method of a custom transform defined inside an object (or in an environment wrapping things in objects like a REPL) will throw a malformed class name exception. E.g., if you do this and run with `-ll info` or your custom transform deletes annotations. Signed-off-by:Schuyler Eldridge <schuyler.eldridge@ibm.com> (cherry picked from commit b076ac8f ) * Add test with Transform inside object Signed-off-by:
Schuyler Eldridge <schuyler.eldridge@ibm.com> (cherry picked from commit 4d80f5d4)
parent
e31e75ab
Please register or sign in to comment