Skip to content
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

Remove guava dependency #88

Merged
merged 22 commits into from
May 15, 2016
Merged

Remove guava dependency #88

merged 22 commits into from
May 15, 2016

Conversation

AlexanderYastrebov
Copy link
Member

Looks like now everybody will do this)

@AlexanderYastrebov
Copy link
Member Author

Fixes #59

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 56c42e2 on remove-guava-competition into 602ae55 on master.

@whiskeysierra
Copy link
Collaborator

Ah! Ok...

@@ -70,7 +68,7 @@
}
}

@VisibleForTesting
//@VisibleForTesting
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd just drop it

@whiskeysierra
Copy link
Collaborator

Almost scary how similar our code is 👻

@whiskeysierra
Copy link
Collaborator

👍


Headers() {
public HeadersBuilder() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could be its own class now.

Copy link
Member Author

@AlexanderYastrebov AlexanderYastrebov May 13, 2016

Choose a reason for hiding this comment

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

I am thinking of implementing Header and Headers implements Iterable<Header> classes instead of map of lists as this will allow to extend it in future.

Copy link
Collaborator

Choose a reason for hiding this comment

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

But we need a map for easy lookups, e.g. in conditions.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 96c8d24 on remove-guava-competition into 602ae55 on master.

@@ -70,18 +71,18 @@

public static Predicate<RawHttpRequest> header(final String key, final String value) {
return request ->
request.getHeaders().containsEntry(key, value);
request.getHeaders().getOrDefault(key, Collections.emptyList()).contains(value);
}

public static Predicate<RawHttpRequest> header(final String key, final Predicate<String> predicate) {
return request ->
request.getHeaders().get(key).stream().anyMatch(predicate);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will throw an exception now if a key doesn't exist. Can you verify with a test?

@whiskeysierra
Copy link
Collaborator

👍

@whiskeysierra whiskeysierra self-assigned this May 15, 2016
@AlexanderYastrebov
Copy link
Member Author

👍 nice collective effort

@AlexanderYastrebov
Copy link
Member Author

👍

@whiskeysierra whiskeysierra merged commit d95a0ca into master May 15, 2016
@whiskeysierra whiskeysierra deleted the remove-guava-competition branch May 15, 2016 21:05
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