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

WELD-2787 Remove legacy integration points for Jetty #2959

Merged
merged 1 commit into from
Apr 26, 2024

Conversation

manovotn
Copy link
Contributor

@manovotn manovotn commented Apr 25, 2024

Based on the discussion in linked Arq. jetty adapter, I think the integration can be simplified to the following.
Note that removing these legacy parts in 5.x doesn't really matter as they play no role in current Jetty versions anyway and you cannot use this version of Weld with older versions of Jetty.

}

@Override
public void initialize(ContainerContext context) {
try {
ServletContext servletContext = context.getServletContext();
String mode = (String) servletContext.getAttribute(JETTY_CDI_ATTRIBUTE);
if (mode == null) {
mode = DECORATING_LISTENER_MODE;
}
switch (mode) {
case CDI_SPI_DECORATOR_MODE:
Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to arquillian/arquillian-container-jetty#197 (comment), this is Jetty's internal class. I suppose the only purpose it serves here is telling apart an undefined state (i.e. throwing an exception) versus this state which, for us, is just a no-op.
I'll add a code comment for my future self to remember that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added a code comment clarification.

@manovotn manovotn merged commit c5d8a65 into weld:5.1 Apr 26, 2024
16 checks passed
@manovotn manovotn deleted the weld2787 branch April 26, 2024 11:43
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.

1 participant