mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
Fixes IDEA-305008 'Inline Method' splits if into multiple if unnecessary GitOrigin-RevId: 841312e518909de3711d8929aed64d7464d1c9d1
19 lines
436 B
Java
19 lines
436 B
Java
// IDEA-305008
|
|
class X {
|
|
public static String tr(String value) {
|
|
if (hide() && non<caret>Null(value) && !value.isEmpty()) {
|
|
if (value.length() >= 2) {
|
|
return value.substring(0, 2) + "...";
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
|
|
boolean nonNull(Object obj) {
|
|
return obj != null;
|
|
}
|
|
|
|
private static boolean hide() {
|
|
return Math.random() > 0.5;
|
|
}
|
|
} |