Fix 'Malformed class name' errors in typeName and related implementations #3533
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaces instances of
getClass.getSimpleName
intypeName
, which is problematic in Java 8, with a common utility function (which just bundles the defaultModule.desiredName
logic). Also disallows mixingHasAutoTypename
into an anonymous Record, which is prone to generatingMalformed class name
errors.Compiler plugin change was validated by attempting to compile anonymous
Bundle with HasAutoTypename
classes, with positive erroring.Contributor Checklist
docs/src
?Type of Improvement
Desired Merge Strategy
Squash
Release Notes
simpleClassName
utility object that emulates agetClass.getSimpleName
call without throwingMalformed class name
exceptions when Java 8 is used.typeName
and all related implementations use this function now instead ofgetClass.getSimpleName
.HasAutoTypename
can no longer be mixed into an anonymousRecord
; the compiler plugin now reports this as a compilation error.Reviewer Checklist (only modified by reviewer)
3.5.x
,3.6.x
, or5.x
depending on impact, API modification or big change:6.0
)?Enable auto-merge (squash)
, clean up the commit message, and label withPlease Merge
.Create a merge commit
.