Can be replaced with 'Long.compare'

pull/161/head
runphp 4 years ago committed by Gitee
parent a30622b460
commit a5925cf2db
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -421,11 +421,7 @@ public final class UUID implements java.io.Serializable, Comparable<UUID>
{ {
// The ordering is intentionally set up so that the UUIDs // The ordering is intentionally set up so that the UUIDs
// can simply be numerically compared as two numbers // can simply be numerically compared as two numbers
return (this.mostSigBits < val.mostSigBits ? -1 : // return Long.compare(this.leastSigBits, val.leastSigBits);
(this.mostSigBits > val.mostSigBits ? 1 : //
(this.leastSigBits < val.leastSigBits ? -1 : //
(this.leastSigBits > val.leastSigBits ? 1 : //
0))));
} }
// ------------------------------------------------------------------------------------------------------------------- // -------------------------------------------------------------------------------------------------------------------

Loading…
Cancel
Save