mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-06 20:39:40 +07:00
- removed `commitDocument` call when `isQuick` argument is passed - pass `element` or `null` to `equalsToText` call (since there is not real need to take it for text comparison) GitOrigin-RevId: 27c5e1a2f484fc56d41dfd210832ae94c9a9b7ab
24 lines
433 B
Java
24 lines
433 B
Java
|
|
class Test {
|
|
|
|
private boolean test(String s) {
|
|
if (s == null) return false;
|
|
s = s.trim();
|
|
if (s.isEmpty()) return false;
|
|
int i;
|
|
try {
|
|
i = Integer.parseInt(s);
|
|
}
|
|
catch (NumberFormatException ex) {
|
|
return false;
|
|
}
|
|
return i > 0;
|
|
}
|
|
|
|
String use(String[] list) {
|
|
for(String str : list) {
|
|
if (!<caret>test(str)) break;
|
|
System.out.println("Ok string: "+str);
|
|
}
|
|
}
|
|
} |