cleanup: simplify code using API from Java 7 (IDEA-297573)

GitOrigin-RevId: 6496c25a422bd09989858b729a7ccd7f43ced2ce
This commit is contained in:
Nikolay Chashnikov
2022-07-18 10:22:01 +02:00
committed by intellij-monorepo-bot
parent e116ca6917
commit 5b951c51d4
3 changed files with 5 additions and 5 deletions

View File

@@ -19,7 +19,7 @@ final class DefaultFileOperations implements FileOperations {
@NotNull
@Override
public Iterator<File> iterator() {
return Collections.<File>emptyList().iterator();
return Collections.emptyIterator();
}
@Override

View File

@@ -301,7 +301,7 @@ public class Iterators {
buffer.add(elem);
}
buffer.clear();
return Collections.<T>emptyList().iterator();
return Collections.emptyIterator();
}
}));
}

View File

@@ -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) {