Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@marcospereira
Copy link
Member

Just some refactoring to use Java 8 stream APIS and have more concise code.

private Object body = null;
private Map<String, Collection<String>> headers = new HashMap<String, Collection<String>>();
private Map<String, List<String>> queryParameters = new HashMap<String, List<String>>();
private Map<String, List<String>> headers = new HashMap<>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

final ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep. Most of attributes here are eligible to be final. I will added it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If play-java-ws has a dependency on Guava then this could be simplified a bit by using an ArrayListMultimap

@gmethvin
Copy link
Member

Wow this is great 👍

Saves us about 100 lines of code.

@gmethvin gmethvin merged commit fe175b0 into playframework:master Apr 18, 2016
@gmethvin
Copy link
Member

@marcospereira It should be ok to backport this, right?

@marcospereira
Copy link
Member Author

@gmethvin yes.

@gmethvin
Copy link
Member

2.5.x: 10c5c01

@marcospereira marcospereira deleted the refactoring-java8 branch April 26, 2016 04:59
@gmethvin gmethvin added this to the 2.5.3 milestone Apr 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants