Unverified Commit d4fc26e0 authored by mergify[bot]'s avatar mergify[bot] Committed by GitHub
Browse files

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: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
(cherry picked from commit b076ac8f

)

* Add test with Transform inside object

Signed-off-by: default avatarSchuyler Eldridge <schuyler.eldridge@ibm.com>
(cherry picked from commit 4d80f5d4)
parent e31e75ab
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment