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 Mar 3, 2023
1 parent 958f4bb commit e574cf2
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1321,13 +1321,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.equals(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 e574cf2

Please sign in to comment.