Skip to content

Commit

Permalink
deserializeSafeFromHeader uses context.getHeader(headerName) inst…
Browse files Browse the repository at this point in the history
…ead of `context.getHeaders()`
  • Loading branch information
Paras Jain committed May 12, 2023
1 parent d168c1a commit e4e5a95
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,8 @@ public static String getSafeFromHeader(final ThreadContext context, final String
return null;
}

String headerValue = null;

Map<String, String> headers = context.getHeaders();
if (!headers.containsKey(headerName) || (headerValue = headers.get(headerName)) == null) {
return null;
}

if (isInterClusterRequest(context) || isTrustedClusterRequest(context) || isDirectRequest(context)) {
return headerValue;
return context.getHeader(headerName);
}

return null;
Expand Down

0 comments on commit e4e5a95

Please sign in to comment.