Polishing

This commit is contained in:
Sam Brannen
2023-09-29 12:33:59 +02:00
parent 6030e62766
commit 0cb4043aac
4 changed files with 23 additions and 7 deletions

View File

@@ -6255,4 +6255,19 @@ public class SpelCompilationCoverageTests extends AbstractExpressionTests {
}
}
// NOTE: saveGeneratedClassFile() can be copied to SpelCompiler and uncommented
// at the end of createExpressionClass(SpelNodeImpl) in order to review generated
// byte code for debugging purposes.
//
// private static void saveGeneratedClassFile(String stringAST, String className, byte[] data) {
// Path path = Path.of("build", StringUtils.replace(className, "/", ".") + ".class");
// System.out.println("Writing compiled SpEL expression [%s] to [%s]".formatted(stringAST, path.toAbsolutePath()));
// try {
// Files.copy(new ByteArrayInputStream(data), path);
// }
// catch (IOException ex) {
// throw new UncheckedIOException(ex);
// }
// }
}