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

Replace guava's Function and Predicate with Java8 idioms #873

Merged
merged 1 commit into from Aug 7, 2015
Merged

Replace guava's Function and Predicate with Java8 idioms #873

merged 1 commit into from Aug 7, 2015

Conversation

acoburn
Copy link
Contributor

@acoburn acoburn commented Aug 7, 2015

@awoods
Copy link

awoods commented Aug 7, 2015

@acoburn
Copy link
Contributor Author

acoburn commented Aug 7, 2015

I went back and forth on that one and decided to leave it in. My rationale was that to do the same thing without forMap, the code will become somewhat longer:

final EventType type = translation.get(i);
if (type == null) {
    throw new IllegalArgumentException("...");
}
return type;

And I felt that the current use of forMap made the code more clear and concise. If our goal was to remove our dependency on guava, that would be one thing, but that wasn't my goal with this PR. (I really tried to confine the changes to the Function and Predicate classes, and this is from the Functions class (note the 's')).

awoods pushed a commit that referenced this pull request Aug 7, 2015
Replace guava's Function and Predicate with Java8 idioms
@awoods awoods merged commit e42ffa2 into fcrepo:master Aug 7, 2015
@acoburn acoburn deleted the fcrepo-1681 branch August 7, 2015 18:02
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.

None yet

2 participants