Simplify code syntax using Java 8 features
Change-Id: I3e59f0c38e4047595374a951619c9b43a46901df
This commit is contained in:
@@ -192,12 +192,7 @@ public class HttpURLConnectionClient implements DownloadClient {
|
||||
for (Map.Entry<String, List<String>> entry : mClient.getHeaderFields().entrySet()) {
|
||||
if ("Link".equalsIgnoreCase((entry.getKey()))) {
|
||||
duplicates = new PriorityQueue<>(entry.getValue().size(),
|
||||
new Comparator<DuplicateLink>() {
|
||||
@Override
|
||||
public int compare(DuplicateLink d1, DuplicateLink d2) {
|
||||
return Integer.compare(d1.mPriority, d2.mPriority);
|
||||
}
|
||||
});
|
||||
Comparator.comparingInt(d -> d.mPriority));
|
||||
|
||||
// https://tools.ietf.org/html/rfc6249
|
||||
// https://tools.ietf.org/html/rfc5988#section-5
|
||||
|
Reference in New Issue
Block a user