-
Notifications
You must be signed in to change notification settings - Fork 1.1k
INT-4448, INT-4449: Fix Gateway for no-arg method #2420
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JIRA: https://jira.spring.io/browse/INT-4448 JIRA: https://jira.spring.io/browse/INT-4449 When we are not interested in the `payload` to send, we use a gateway method without any args, but in this case for send operation (or send-and-receive) we should specify a default `payloadExpression` The `MessagingGatewayRegistrar` fails with `NPE` if we don't have a any global headers and have `defaultPayloadExpression` Also in this case the `GatewayProxyFactoryBean` fails to send and fallbacks to receive with the meaning "no args, not payloadExpression" * Fix `MessagingGatewayRegistrar` to check `hasDefaultHeaders` before processing them * Fix `GatewayProxyFactoryBean` to consult `this.globalMethodMetadata` if there is no `payloadExpression` for the method specific metadata **Cherry-pick to 5.0.x and 4.3.x**
is not available anymore: ``` Location: http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz?AuthParam=1523990114_ee8c82cbe67bc87d192cb79d3b902d2f [following] --2018-04-17 18:33:14-- http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz?AuthParam=1523990114_ee8c82cbe67bc87d192cb79d3b902d2f Connecting to download.oracle.com (download.oracle.com)|23.53.120.105|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2018-04-17 18:35:15 ERROR 404: Not Found. ```
Would you mind to take a look/merge. This is kinda blocker since no one new PR can't pass Travis for proper coverage. Thanks |
garyrussell
pushed a commit
that referenced
this pull request
Apr 18, 2018
* INT-4448, INT-4449: Fix Gateway for no-arg method JIRA: https://jira.spring.io/browse/INT-4448 JIRA: https://jira.spring.io/browse/INT-4449 When we are not interested in the `payload` to send, we use a gateway method without any args, but in this case for send operation (or send-and-receive) we should specify a default `payloadExpression` The `MessagingGatewayRegistrar` fails with `NPE` if we don't have a any global headers and have `defaultPayloadExpression` Also in this case the `GatewayProxyFactoryBean` fails to send and fallbacks to receive with the meaning "no args, not payloadExpression" * Fix `MessagingGatewayRegistrar` to check `hasDefaultHeaders` before processing them * Fix `GatewayProxyFactoryBean` to consult `this.globalMethodMetadata` if there is no `payloadExpression` for the method specific metadata **Cherry-pick to 5.0.x and 4.3.x** * Remove `oracle-java8-installer` since it looks like the resource is not available anymore: ``` Location: http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz?AuthParam=1523990114_ee8c82cbe67bc87d192cb79d3b902d2f [following] --2018-04-17 18:33:14-- http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz?AuthParam=1523990114_ee8c82cbe67bc87d192cb79d3b902d2f Connecting to download.oracle.com (download.oracle.com)|23.53.120.105|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2018-04-17 18:35:15 ERROR 404: Not Found. ```
garyrussell
pushed a commit
that referenced
this pull request
Apr 18, 2018
* INT-4448, INT-4449: Fix Gateway for no-arg method JIRA: https://jira.spring.io/browse/INT-4448 JIRA: https://jira.spring.io/browse/INT-4449 When we are not interested in the `payload` to send, we use a gateway method without any args, but in this case for send operation (or send-and-receive) we should specify a default `payloadExpression` The `MessagingGatewayRegistrar` fails with `NPE` if we don't have a any global headers and have `defaultPayloadExpression` Also in this case the `GatewayProxyFactoryBean` fails to send and fallbacks to receive with the meaning "no args, not payloadExpression" * Fix `MessagingGatewayRegistrar` to check `hasDefaultHeaders` before processing them * Fix `GatewayProxyFactoryBean` to consult `this.globalMethodMetadata` if there is no `payloadExpression` for the method specific metadata **Cherry-pick to 5.0.x and 4.3.x** * Remove `oracle-java8-installer` since it looks like the resource is not available anymore: ``` Location: http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz?AuthParam=1523990114_ee8c82cbe67bc87d192cb79d3b902d2f [following] --2018-04-17 18:33:14-- http://download.oracle.com/otn-pub/java/jdk/8u161-b12/2f38c3b165be4555a1fa6e98c45e0808/jdk-8u161-linux-x64.tar.gz?AuthParam=1523990114_ee8c82cbe67bc87d192cb79d3b902d2f Connecting to download.oracle.com (download.oracle.com)|23.53.120.105|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2018-04-17 18:35:15 ERROR 404: Not Found. ```
cherry-picked to 5.0.x, 4.3.x |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JIRA: https://jira.spring.io/browse/INT-4448
JIRA: https://jira.spring.io/browse/INT-4449
When we are not interested in the
payload
to send, we use a gatewaymethod without any args, but in this case for send operation (or
send-and-receive) we should specify a default
payloadExpression
The
MessagingGatewayRegistrar
fails withNPE
if we don't have aany global headers and have
defaultPayloadExpression
Also in this case the
GatewayProxyFactoryBean
fails to sendand fallbacks to receive with the meaning "no args, not payloadExpression"
MessagingGatewayRegistrar
to checkhasDefaultHeaders
beforeprocessing them
GatewayProxyFactoryBean
to consultthis.globalMethodMetadata
if there is no
payloadExpression
for the method specific metadataCherry-pick to 5.0.x and 4.3.x