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

Fail if annotated server resource is used as a client #2324

Merged
merged 2 commits into from
Apr 1, 2022

Conversation

fawind
Copy link
Contributor

@fawind fawind commented Apr 1, 2022

Before this PR

FLUP on #2320 where we added the marker annotations.

After this PR

Fail if a JaxRs class is only annotated with @JaxRsServer but is used to create a client. Note that we still succeed if no annotation is given or if the class is annotated with both @JaxRsServer and @JaxRsClient.

==COMMIT_MSG==
Fail if annotated server resource is used as a client
==COMMIT_MSG==

Possible downsides?

I wonder if this should be an error-prone check instead to fail at compile rather then runtime?
We might want to add something similar to verify client interfaces are not used as servers.

@fawind fawind requested a review from carterkozak April 1, 2022 11:10
@changelog-app
Copy link

changelog-app bot commented Apr 1, 2022

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Fail if annotated server resource is used as a client

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from ferozco April 1, 2022 11:11
@bulldozer-bot bulldozer-bot bot merged commit 8fa1f91 into develop Apr 1, 2022
@bulldozer-bot bulldozer-bot bot deleted the fw/verify_client_annotation branch April 1, 2022 12:08
@svc-autorelease
Copy link
Collaborator

Released 7.33.0

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

Successfully merging this pull request may close these issues.

4 participants