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

fix: Pass null for Context method arguments in JaxRsRequestHandlerProxy #4935

Merged

Conversation

nicolatimeus
Copy link
Contributor

Note: We are using the Conventional Commits convention for our pull request titles. Please take a look at the PR title format document for the supported types and scopes.

Brief description of the PR. [e.g. Added null check on object to avoid NullPointerException]

Currently the JaxRsRequestHandlerProxy supports at most a single parameter per REST endpoint method.

Methods that use arguments annotated with the Context annotation to receive for example the HttpServletRequest/HttpServletResponse/ContainerRequestContext associated with the current request are not supported.

This PR changes JaxRsRequestHandlerProxy so that it passes null as value for that arguments, since the injected classes are in most cases HTTP specific and it is difficult to provide an equivalent in case of MQTT connection.

  • Fixes the service listing REST API not working over MQTT.

@nicolatimeus nicolatimeus force-pushed the enh_jax-rs-proxy-context branch from 2835ebe to 0b8b926 Compare October 30, 2023 19:44
@MMaiero MMaiero merged commit 7fe29dc into eclipse-kura:develop Nov 1, 2023
@nicolatimeus nicolatimeus deleted the enh_jax-rs-proxy-context branch March 22, 2024 08:05
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