-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle default package name when generating class names #13541
Conversation
45c0aab
to
be2cb89
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could create some util method/class that could be used for all occurences except the ValueResolverGenerator
which is an indepenent project.
We should probably also add some tests, something similar to https://github.com/quarkusio/quarkus/blob/master/extensions/arc/deployment/src/test/java/SingleLetterDefaultPackageTest.java.
...pendent-projects/arc/processor/src/main/java/io/quarkus/arc/processor/AbstractGenerator.java
Outdated
Show resolved
Hide resolved
I agree it would be nice with a utility method; with this we are porbably at like 10+ changes we discovered it. |
I wonder if we can just address this at a lower level:
|
be2cb89
to
7e7b859
Compare
@stuartwdouglas your choice :) for now I've updated the PR to be rebased against latest master. |
I agree we should add some but I would rather put those into some jbang tests in a separate PR if thats okey. |
It's OK. However, I would still prefer something like |
I'm closing this one, it doesn't compile and looks like we might want to pursue a different path. Please open a new one once things are sorted out. |
I have opened #14839 |
Fixes #13540
Replaced all occurrences of
targetPackage.replace('.', '/') + "/" + baseName
with
(targetPackage.isEmpty() ? "" : targetPackage.replace('.', '/') + "/") + baseName
to avoid generating file names that goes to the root (/) of the file system.