-
Notifications
You must be signed in to change notification settings - Fork 25
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
Auto Generate Event Publishers #554
Conversation
inject-generator/src/main/java/io/avaje/inject/generator/TypeExtendsReader.java
Show resolved
Hide resolved
@@ -284,7 +284,7 @@ static String commonParent(String currentTop, String aPackage) { | |||
static String getNamed(Element p) { | |||
final NamedPrism named = NamedPrism.getInstanceOn(p); | |||
if (named != null) { | |||
return named.value(); | |||
return named.value().replace("\"", "\\\""); |
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.
Why is this replace of quotes here?
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.
I'll revert this. If we are making some change here we want to be explicit in a separate PR and be clear what the change is and why.
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.
The reason is to bring it in line with the annotation qualifiers
Makes publishing events more CDI-like. The generator will now create a publisher class when it sees
Event<T>
injected and a generated impl doesn't already exist.Event<T>
dependency will create and wire a publisher that by default sends qualified events