|
@@ -63,8 +63,8 @@ public class JdkCompiler extends AbstractCompiler {
|
|
|
javaFileManager.putFileForInput(StandardLocation.SOURCE_PATH, packageName,
|
|
|
className + ClassUtils.JAVA_EXTENSION, javaFileObject);
|
|
|
Boolean result = compiler.getTask(null, javaFileManager, diagnosticCollector, options,
|
|
|
- null, Arrays.asList(new JavaFileObject[]{javaFileObject})).call();
|
|
|
- if (result == null || ! result.booleanValue()) {
|
|
|
+ null, Collections.singletonList(javaFileObject)).call();
|
|
|
+ if (result == null || !result) {
|
|
|
throw new IllegalStateException("Compilation failed. class: " + name + ", diagnostics: " + diagnosticCollector);
|
|
|
}
|
|
|
return classLoader.loadClass(name);
|
|
@@ -214,13 +214,6 @@ public class JdkCompiler extends AbstractCompiler {
|
|
|
throws IOException {
|
|
|
Iterable<JavaFileObject> result = super.list(location, packageName, kinds, recurse);
|
|
|
|
|
|
- ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
|
|
|
- List<URL> urlList = new ArrayList<URL>();
|
|
|
- Enumeration<URL> e = contextClassLoader.getResources("com");
|
|
|
- while (e.hasMoreElements()) {
|
|
|
- urlList.add(e.nextElement());
|
|
|
- }
|
|
|
-
|
|
|
ArrayList<JavaFileObject> files = new ArrayList<JavaFileObject>();
|
|
|
|
|
|
if (location == StandardLocation.CLASS_PATH && kinds.contains(Kind.CLASS)) {
|