-
Notifications
You must be signed in to change notification settings - Fork 693
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
TOMEE-4375 - Fix NPEs in SavedRequest #1328
Conversation
Stack trace fetching "Content-Type" header: java.lang.NullPointerException: Cannot invoke "java.util.List.get(int)" because the return value of "java.util.Map.get(Object)" is null |
tomee/tomee-security/src/main/java/org/apache/tomee/security/http/SavedRequest.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice PR!
I've commented a few minor details I would still like to see changed. Also getHeaderNames()
is not included in your changes
tomee/tomee-security/src/main/java/org/apache/tomee/security/http/SavedRequest.java
Show resolved
Hide resolved
} | ||
|
||
@Override | ||
public String getHeader(String name) { | ||
return headers.get(name).get(0); | ||
List<String> header = headers.get(name); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in getHeaders(String)
you assume headers
may be null, this check is missing here
@mpuening can you fix |
No description provided.