Skip to content
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

Fix issue where web.xml broke augmentation #1979

Merged
merged 1 commit into from
Apr 10, 2019

Conversation

geoand
Copy link
Contributor

@geoand geoand commented Apr 10, 2019

This happened because an empty list of additional beans is being passed
by the Undertow build step

Fixes: #1976

@geoand geoand added this to the 0.13.2 milestone Apr 10, 2019
@geoand geoand marked this pull request as ready for review April 10, 2019 11:30
@geoand geoand requested a review from mkouba April 10, 2019 11:30
@geoand
Copy link
Contributor Author

geoand commented Apr 10, 2019

@rsvoboda Could you please make sure the original issue is addressed with this PR?

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some questions.

@@ -61,9 +61,6 @@ public AdditionalBeanBuildItem(Class<?>... beanClasses) {
}

AdditionalBeanBuildItem(List<String> beanClasses, boolean removable, DotName defaultScope) {
if (beanClasses.isEmpty()) {
throw new IllegalArgumentException("No bean classes specified");
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't the right fix be to not create the build item in the first place? I think it was the initial design.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is what I thought initially as well, but then I thought that the consumer of AdditionalBeanBuildItem doesn't really care - for them it's much easier to just pass whatever collection they have and get on with business.
Either way we want to do it, I'm fine with it - it's just that I think this way would avoid similar surprises in the future

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's fine with me. It's easier for AdditionalBeanBuildItem producers.

integration-tests/webxml/pom.xml Outdated Show resolved Hide resolved
integration-tests/webxml/pom.xml Outdated Show resolved Hide resolved
@geoand
Copy link
Contributor Author

geoand commented Apr 10, 2019

I'll update the tests according to @stuartwdouglas 's suggestions

@geoand geoand force-pushed the additional-bean-bug branch 2 times, most recently from b619876 to c662921 Compare April 10, 2019 12:07
This happened because an empty list of additional beans is being passed
by the Undertow build step

Fixes: quarkusio#1976
@geoand
Copy link
Contributor Author

geoand commented Apr 10, 2019

Test converted to "QuarkusUnitTest"

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, all good then. Let's wait for CI.

@geoand geoand dismissed stuartwdouglas’s stale review April 10, 2019 13:23

Review has been addressed

@geoand geoand merged commit bc60dae into quarkusio:master Apr 10, 2019
@geoand geoand deleted the additional-bean-bug branch April 10, 2019 13:25
@rsvoboda
Copy link
Member

@rsvoboda Could you please make sure the original issue is addressed with this PR?

The test passed with this change, I got a bit stuck as I built just arc extension and not devtools/maven module ...

@geoand
Copy link
Contributor Author

geoand commented Apr 10, 2019

@rsvoboda Thanks for the input! I had tried it as well on the reproducer project and it also passed for me :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants