You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixed along with a general revision of StandardTypeComparator.
As a reminder for casual readers: For some reason, Integer.compare and Long.compare have been introduced as late as JDK 1.7, even if their Float and Double counterparts have been available for much longer.
Since all that those compare methods do is to calculate a comparison result based on primitive values, it's straightforward to implement equivalent behavior:
private static int compare(int x, int y) {
return (x < y ? -1 : (x > y ? 1 : 0));
}
private static int compare(long x, long y) {
return (x < y ? -1 : (x > y ? 1 : 0));
}
Stéphane Nicoll opened SPR-11319 and commented
To prevent issue similar to #15937 we have integrated animal sniffer in our build to check the use of the JDK APIs.
This issue is about collecting the classes that are using 1.7+ APIs, knowing that some are for perfectly valid reasons (support of 1.8 features)
Issue Links:
Referenced from: commits 838855b
The text was updated successfully, but these errors were encountered: