Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

[REEF-781] Fix NPE on receiving filename query without arguments #520

Merged
merged 1 commit into from
Oct 5, 2015

Conversation

dongjoon-hyun
Copy link
Member

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

Pull Request:
Closes #520

dongjoon-hyun added a commit to dongjoon-hyun/reef that referenced this pull request Sep 23, 2015
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
@asfbot
Copy link

asfbot commented Sep 23, 2015

Reef-pull-request-ubuntu #590 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Sep 23, 2015

REEF-pull-request-windows3 #479 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Sep 23, 2015

Reef-pull-request-ubuntu #591 SUCCESS
This pull request looks good

@asfbot
Copy link

asfbot commented Sep 23, 2015

REEF-pull-request-windows3 #480 SUCCESS
This pull request looks good

@@ -169,17 +170,17 @@ public void onHttpRequest(
final List names = parsedHttpRequest.getQueryMap().get("filename");
Copy link
Contributor

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?

@afchung
Copy link
Contributor

afchung commented Sep 23, 2015

@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?

@dongjoon-hyun
Copy link
Member Author

Oh, Sorry for late response, @afchung . I did miss your comments here until now. I will handle them all. Thank you for your advice.

dongjoon-hyun added a commit to dongjoon-hyun/reef that referenced this pull request Oct 4, 2015
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
@dongjoon-hyun
Copy link
Member Author

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.

dongjoon-hyun added a commit to dongjoon-hyun/reef that referenced this pull request Oct 4, 2015
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
@afchung
Copy link
Contributor

afchung commented Oct 5, 2015

This looks good, I'll test and merge.

@asfgit asfgit merged commit ce017df into apache:master Oct 5, 2015
@dongjoon-hyun
Copy link
Member Author

Thank you, @afchung . :)

@dongjoon-hyun dongjoon-hyun deleted the REEF-781 branch October 9, 2015 01:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
4 participants