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

Use bytecode transformation to reduce code duplication on jakarta modules #2269

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

velo
Copy link
Member

@velo velo commented Dec 17, 2023

No description provided.

@velo velo requested review from vitalijr2 and kdavisk6 December 17, 2023 19:22
<skip>true</skip>
<module>
<moduleInfo>
<exports>!jsr311.api;
Copy link
Member Author

Choose a reason for hiding this comment

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

@aalmiray any idea what went wrong here?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this might have been a split package.

@velo velo merged commit ccb706a into master Dec 19, 2023
3 checks passed
@velo velo deleted the jakarta_modules branch December 19, 2023 07:20
@steam0
Copy link
Contributor

steam0 commented May 21, 2024

Hey @velo, I don't know if I have missed something, but how am I supposed to use JAXRS3Contract with jakarta?

In versions before 13.1 I would use jakarta annotations in my specifications, but after 13.2 when I'm changing from JakartaContract to JAXRS3Contract my tests fails because the following code fails

Contract.java

     (...)
     
      for (final Annotation methodAnnotation : method.getAnnotations()) {
        processAnnotationOnMethod(data, methodAnnotation, method); // No annotations found
      }
      if (data.isIgnored()) {
        return data;
      }
      checkState(data.template().method() != null,
          "Method %s not annotated with HTTP method type (ex. GET, POST)%s",
          data.configKey(), data.warnings());
          
      (...)

I see that the annotation processor fails as my specification uses @jakarta.ws.rs.Path but the GuardedAnnotationProcessor.test function tries to match it with javax.ws.rs.Path.

Screenshot 2024-05-21 at 15 12 21

Is there any documentation that belongs together with this commit that explains how to use jakarta annotations?

@velo
Copy link
Member Author

velo commented May 21, 2024

That is odd, how my tests are working?!

Anything peculiar about what you are doing?

@steam0
Copy link
Contributor

steam0 commented May 21, 2024

Well, kind of. We have a library where we auto builds feign clients for our internal developers. That lib has previously supported both javax and jakarta in that same lib, but now I kan only get one version of jaxrs3 either javax or jakarta.

Any suggestions too how we can do that with this implementation?

velo added a commit that referenced this pull request Oct 7, 2024
…ules (#2269)

Co-authored-by: Marvin Froeder <velobr@gmail.com>
velo added a commit that referenced this pull request Oct 8, 2024
…ules (#2269)

Co-authored-by: Marvin Froeder <velobr@gmail.com>
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.

3 participants