-
Notifications
You must be signed in to change notification settings - Fork 117
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
Make server-side components use only Jakarta EE #7837
Conversation
In the past we allowed using either Java 8 or 11+ to test Nessie services. Some time ago, Nessie started to require Java 11 for all services. This change is a consequence of the former two changes and removes dependencies to `javax.*` (Java EE), favoring `jakarta.*` (Jakarta EE). Most code changes are pretty boring: * Remove `javax.*` annotations * Remove dependencies from the build scripts * `JerseyServer` in the compatibility tests has the only "real" code change
...tibility/jersey/src/main/java/org/projectnessie/tools/compatibility/jersey/JerseyServer.java
Outdated
Show resolved
Hide resolved
@@ -172,20 +174,24 @@ private static void withClass( | |||
|
|||
private static void withJavaxClass( |
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.
Since we are moving towards jakarta and eventually javax will go away, it would be easier to understand if we inverted the logic:
withJakartaClass(
"org.projectnessie.services.restjakarta.ContentKeyParamConverterProvider",
config::register,
true);
private static void withJakartaClass(
String jakartaClassName, Consumer<Class<?>> whenClassExists, boolean mandatory) {
Iterator<String> classNames =
List.of(jakartaClassName, jakartaClassName.replace("restjakarta.", "restjavax."))
.iterator();
// ...
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.
Are we sure we need this replacement: javaxClassName.replace("restjavax.", "rest.")
? I removed it, and the build passed.
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.
Some older Nessie versions required it (a while ago). Maybe no longer needed.
In the past we allowed using either Java 8 or 11+ to test Nessie services. Some time ago, Nessie started to require Java 11 for all services. This change is a consequence of the former two changes and removes dependencies to
javax.*
(Java EE), favoringjakarta.*
(Jakarta EE).Most code changes are pretty boring:
javax.*
annotationsJerseyServer
in the compatibility tests has the only "real" code change