mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8277868: Use Comparable.compare() instead of surrogate code
Reviewed-by: rriggs, aivanov
This commit is contained in:
parent
937126b140
commit
20db7800a6
12 changed files with 23 additions and 75 deletions
|
@ -447,13 +447,7 @@ public class CookieManager extends CookieHandler
|
|||
// Check creation time. Sort older first
|
||||
long creation1 = c1.getCreationTime();
|
||||
long creation2 = c2.getCreationTime();
|
||||
if (creation1 < creation2) {
|
||||
return -1;
|
||||
}
|
||||
if (creation1 > creation2) {
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
return Long.compare(creation1, creation2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue