mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 15:50:53 +07:00
17 lines
391 B
Java
17 lines
391 B
Java
// "Fix all 'Suspicious usage of compare method' problems in file" "true"
|
|
import java.util.*;
|
|
|
|
class Test {
|
|
String test(Comparable<?> c1, Comparable<?> c2) {
|
|
int result = c1.compareTo(c2);
|
|
if(0 == result) {
|
|
return "equal";
|
|
} else if(0 > result) {
|
|
return "less";
|
|
} else if(0 < result) {
|
|
return "greater";
|
|
} else {
|
|
return "impossible";
|
|
}
|
|
}
|
|
} |