skinny85 / jilt

Java annotation processor library for auto-generating Builder (including Staged Builder) pattern classes
Other
240 stars 13 forks source link

Fix wrong package name if annotation processing is done with Eclipse … #8

Closed der-R closed 1 year ago

der-R commented 1 year ago

…JDT compiler

While OpenJDK / Sun compiler prints out the fully qualified name for PackageElement objects, the Eclipse JDT compiler adds a 'package ' in front of it which leads to wrong path name when generating the builder files. To fix this, the qualified name is explicitly used.

Code of eclipse JDT toString() method:

eclipse_jdt_adds_package_to_string

Compared to OpenJDK:

Open JDK to string

.isUnnamed() check is not necessary anymore, because getQualifiedName() returns an empty string in case of an empty package.

skinny85 commented 1 year ago

Thanks so much for the fix @der-R!

Can you make sure your email is verified? The GitHub Actions don't want to start for this PR with the message:

Error: .github#L1 Please verify your email address to run GitHub Actions workflows. https://github.com/settings/emails

der-R commented 1 year ago

Verified my E-Mail and did a force-push to trigger the action. Hope it works now.