mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
JavaSourceCompilerTest
This commit is contained in:
@@ -36,7 +36,7 @@ public class JavaSourceCompilerTest {
|
||||
// .addLibrary(FileUtil.file("D:\\m2_repo\\cn\\hutool\\hutool-all\\5.5.7\\hutool-all-5.5.7.jar"))
|
||||
.compile();
|
||||
final Class<?> clazz = classLoader.loadClass("c.C");
|
||||
Object obj = ReflectUtil.newInstance(clazz);
|
||||
final Object obj = ReflectUtil.newInstance(clazz);
|
||||
Assert.assertTrue(String.valueOf(obj).startsWith("c.C@"));
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ public class JavaSourceCompilerTest {
|
||||
CompilerUtil.getCompiler(null)
|
||||
.addSource(FileUtil.file("test-compile/error/ErrorClazz.java"))
|
||||
.compile();
|
||||
} catch (Exception ex) {
|
||||
} catch (final Exception ex) {
|
||||
exception = ex;
|
||||
} finally {
|
||||
Assert.assertTrue(exception instanceof CompilerException);
|
||||
|
Reference in New Issue
Block a user