mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-171854 Suggest replacing boxed compareTo with convenience methods from Java 7
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
// "Fix all 'Unnecessary boxing to compare primitives' problems in file" "true"
|
||||
public class Test {
|
||||
public void test(int a, int b) {
|
||||
if(Integer.compare(a, b) > 0) {
|
||||
System.out.println(1);
|
||||
}
|
||||
if(Long.compare(a, b) > 0) {
|
||||
System.out.println(1);
|
||||
}
|
||||
if(Double.compare(a, b) > 0) {
|
||||
System.out.println(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user