-
Notifications
You must be signed in to change notification settings - Fork 357
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
[3.1] Jetty 12 HTTP/2 support #5481
Conversation
@@ -0,0 +1,60 @@ | |||
/* |
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.
java11 folder does not seem necessary. It can be put among the other files in the java folder. That would make the build (pom file) simpler.
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 don't think it will work as expected. Because in the case of the JettyHttp2ClientSupplier.java
in the separate src folder the resulting jar will look like:
META-INF/versions/<JDK-version>/<package>/JettyHttp2ClientSupplier.java
and for related JDK a proper version will be picked up. However, if the JettyHttp2ClientSupplier.java
would be in the main src folder it will be located directly in the compiled classes folder org.glassfish.jersey.jetty.http2.container
(without version separation), and JDK probably won't be able to overwrite it by picking another JettyHttp2ClientSupplier.java
for a particular JDK version (17+ in our case)
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.
That's not how it works. The classloader first checks the META-INF versions and the classes afterwards. See for instance core-common in 2.x. It works for JDK 11, there is no META-INF/versions/8.
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.
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.
Yeah, I've got why it shall be here - if we compile 2 similar classes within the same cycle. The compile phase will fail. It is required to exclude from compiling either one or another version of the same class file. It's not possible to compile both files within the same name in a similar compile phase.
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.
In case of JDK 17+ and no version separation we will have 2 similar class names in one compile phase.
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.
actually, the resulting jar jersey-jetty-http2-connector.jar
does not have the versions/11
folder as well, only versions/17
but sources structure shall be kept for compilation reasons.
...nector/src/main/resources/org/glassfish/jersey/jetty/http2/connector/localization.properties
Outdated
Show resolved
Hide resolved
...nector/src/main/resources/org/glassfish/jersey/jetty/http2/connector/localization.properties
Outdated
Show resolved
Hide resolved
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.
Can the bom.pom be also updated?
@@ -0,0 +1,36 @@ | |||
/* |
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.
again java11 folder
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.
see my first comment
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
51eb882
to
e045e3d
Compare
No description provided.