Skip to content

Commit

Permalink
[EJBCLIENT-424] Refactor context data cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
tadamski committed Feb 14, 2023
1 parent e62ea58 commit 4531804
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1320,13 +1320,10 @@ class MethodCallResultProducer implements EJBReceiverInvocationContext.ResultPro
*/
private void cleanContextDataBeforeUnmarshalling(EJBClientInvocationContext clientInvocationContext) {
Map<String, Object> contextData = clientInvocationContext.getContextData();
@SuppressWarnings("unchecked")
Set<String> returnedContextDataKeys = (Set<String>) contextData.get(EJBClientInvocationContext.RETURNED_CONTEXT_DATA_KEY);
if(returnedContextDataKeys != null) {
contextData.keySet().removeAll(returnedContextDataKeys);
}
contextData.keySet().removeIf(k -> (k != EJBClientInvocationContext.RETURNED_CONTEXT_DATA_KEY));
}



public Object apply(final Void ignored0, final Void ignored1) throws Exception {
final ResponseMessageInputStream response;
if(inputStream instanceof ResponseMessageInputStream) {
Expand Down

0 comments on commit 4531804

Please sign in to comment.