mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-18 08:50:57 +07:00
Fixes IDEA-37432 "Inline Method refactoring is not supported when return statement interrupts the execution flow" is wrong Fixes IDEA-158665 Support Inline Method refactoring when return statement interrupts the execution flow Fixes IDEA-180007 Inline method with returns should work when inlining point is the only expression in a loop or lambda body
21 lines
519 B
Java
21 lines
519 B
Java
import java.util.*;
|
|
|
|
class AAA {
|
|
private void foo(List<String> list) {
|
|
for (String val : list) {
|
|
<caret>checkVal(val);
|
|
}
|
|
}
|
|
|
|
private void checkVal(String message) {
|
|
if (message == null) return;
|
|
message = message.trim();
|
|
if (message.isEmpty()) return;
|
|
try {
|
|
Integer.parseInt(message);
|
|
} catch (NumberFormatException e) {
|
|
return;
|
|
}
|
|
throw new IllegalArgumentException("Should not be a number!");
|
|
}
|
|
} |