Files
openide/java/java-tests/testData/refactoring/extractMethod/StringTemplateExceptionJava21Preview_after.java
Tagir Valeev 77d1d0ab2e [java-tests] Mock JDK 21 (downloaded from the repository); remove in-place mocks where possible
Part of IDEA-334171 Store MockJDK in artifact repository, rather than in Git

GitOrigin-RevId: 9c6214e3ead47cc164d20813f5a2b37136607213
2023-10-06 10:48:24 +00:00

15 lines
431 B
Java

class Main {
class FailureException extends Exception {}
public static void x(StringTemplate.Processor<String, FailureException> p, int i, int j) {
try {
String t = newMethod(p, i, j);
}
catch (FailureException ignore) {}
}
private static String newMethod(StringTemplate.Processor<String, FailureException> p, int i, int j) throws FailureException {
return p."\{i} + \{j} = \{i + j}";
}
}