-
Notifications
You must be signed in to change notification settings - Fork 97
[REEF-781] Fix NPE on receiving filename query without arguments #520
Conversation
941c008
to
877d87e
Compare
This fixes NullPointerException cases in `filename` query handling code of HttpServerReefEventHandler. JIRA: [REEF-781](https://issues.apache.org/jira/browse/REEF-781) Pull Request: Closes apache#520
Reef-pull-request-ubuntu #590 SUCCESS |
REEF-pull-request-windows3 #479 SUCCESS |
Reef-pull-request-ubuntu #591 SUCCESS |
REEF-pull-request-windows3 #480 SUCCESS |
@@ -169,17 +170,17 @@ public void onHttpRequest( | |||
final List names = parsedHttpRequest.getQueryMap().get("filename"); |
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.
names seems to be of List<String>
. Can you change this to avoid the dynamic typecast?
@dongjoon-hyun Took a first pass, there may be more problems with this code than initially anticipated, but it looks like it should fit within the scope of a single JIRA item. Could you modify the JIRA item to include these new potential errors? |
Oh, Sorry for late response, @afchung . I did miss your comments here until now. I will handle them all. Thank you for your advice. |
877d87e
to
d0c61d6
Compare
This PR addresses the followings issues in HttpServerReefEventHandler: * Fix NullPointerException on `filename` query without arguments * Use typed list to avoid dynamic type-casting * Remove mixed use of both `getWriter()` and `getOutputStream()' JIRA: [REEF-781](https://issues.apache.org/jira/browse/REEF-781) Pull Request: Closes apache#520
Hi, @afchung . I rebased and revised the code according to your advice. Also, I updated the content of JIRA and git commit message. By the way, the title of JIRA looks enough since the newly added code changes are a little bit less important. |
d0c61d6
to
6c4359e
Compare
This PR addresses the followings issues in HttpServerReefEventHandler: * Fix NullPointerException on `filename` query without arguments * Use typed list to avoid dynamic type-casting * Remove mixed use of both `getWriter()` and `getOutputStream()' JIRA: [REEF-781](https://issues.apache.org/jira/browse/REEF-781) Pull Request: Closes apache#520
This PR addresses the followings issues in HttpServerReefEventHandler: * Fix NullPointerException on `filename` query without arguments * Use typed list to avoid dynamic type-casting * Remove mixed use of both `getWriter()` and `getOutputStream()' JIRA: [REEF-781](https://issues.apache.org/jira/browse/REEF-781) Pull Request: Closes apache#520
6c4359e
to
ce017df
Compare
This looks good, I'll test and merge. |
Thank you, @afchung . :) |
This PR addresses the followings issues in HttpServerReefEventHandler:
filename
query without argumentsgetWriter()
and `getOutputStream()'JIRA:
REEF-781
Pull Request:
Closes #520