Files
openide/java/java-tests/testData/refactoring/inlineMethod/BooleanModelFinalCondition.java
Vladimir Plyashkun 2d9369d983 CPP-16098 - Lags during inplace rename typing
- changed behaviour in safe way by introducing new method to check that particular expression does not depend
  on committed PSI

GitOrigin-RevId: f5ec732613cdafdcef8a1d48eb8d04135c634047
2019-05-03 01:39:50 +03:00

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);
}
}
}