mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
cleanup: simplify code using API from Java 7 (IDEA-297573)
GitOrigin-RevId: 6496c25a422bd09989858b729a7ccd7f43ced2ce
This commit is contained in:
committed by
intellij-monorepo-bot
parent
e116ca6917
commit
5b951c51d4
@@ -19,7 +19,7 @@ final class DefaultFileOperations implements FileOperations {
|
||||
@NotNull
|
||||
@Override
|
||||
public Iterator<File> iterator() {
|
||||
return Collections.<File>emptyList().iterator();
|
||||
return Collections.emptyIterator();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -301,7 +301,7 @@ public class Iterators {
|
||||
buffer.add(elem);
|
||||
}
|
||||
buffer.clear();
|
||||
return Collections.<T>emptyList().iterator();
|
||||
return Collections.emptyIterator();
|
||||
}
|
||||
}));
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ public final class Comparing {
|
||||
}
|
||||
|
||||
public static int compare(byte o1, byte o2) {
|
||||
return o1 < o2 ? -1 : o1 == o2 ? 0 : 1;
|
||||
return Byte.compare(o1, o2);
|
||||
}
|
||||
|
||||
public static int compare(boolean o1, boolean o2) {
|
||||
@@ -138,11 +138,11 @@ public final class Comparing {
|
||||
}
|
||||
|
||||
public static int compare(int o1, int o2) {
|
||||
return o1 < o2 ? -1 : o1 == o2 ? 0 : 1;
|
||||
return Integer.compare(o1, o2);
|
||||
}
|
||||
|
||||
public static int compare(long o1, long o2) {
|
||||
return o1 < o2 ? -1 : o1 == o2 ? 0 : 1;
|
||||
return Long.compare(o1, o2);
|
||||
}
|
||||
|
||||
public static int compare(double o1, double o2) {
|
||||
|
||||
Reference in New Issue
Block a user