Skip to content

Commit

Permalink
Inlining lambda as a constructor ref
Browse files Browse the repository at this point in the history
  • Loading branch information
ajs6f committed Jun 30, 2015
1 parent f2b6c34 commit 29bcccb
Showing 1 changed file with 1 addition and 3 deletions.
Expand Up @@ -41,7 +41,7 @@ public class SinglePrefer {
* @throws ParseException if parse exception occurred
*/
public SinglePrefer(final String header) throws ParseException {
preferTags.addAll(HttpHeaderReader.readList(PREFER_CREATOR, header));
preferTags.addAll(HttpHeaderReader.readList(PreferTag::new, header));
}

/**
Expand Down Expand Up @@ -84,8 +84,6 @@ public PreferTag getHandling() {
.findFirst().orElse(emptyTag());
}

private static final HttpHeaderReader.ListElementCreator<PreferTag> PREFER_CREATOR = r -> new PreferTag(r);

protected Set<PreferTag> preferTags() {
return preferTags;
}
Expand Down

0 comments on commit 29bcccb

Please sign in to comment.