From a0ec4acae8b69a024fa34c39af6a4d651559a426 Mon Sep 17 00:00:00 2001 From: tdurieux Date: Wed, 7 Sep 2016 11:23:34 +0200 Subject: [PATCH] fix(noclasspath): tolerates missing annotation types --- src/main/java/spoon/support/compiler/jdt/JDTBatchCompiler.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/spoon/support/compiler/jdt/JDTBatchCompiler.java b/src/main/java/spoon/support/compiler/jdt/JDTBatchCompiler.java index 2f385a24518..78664e1c085 100644 --- a/src/main/java/spoon/support/compiler/jdt/JDTBatchCompiler.java +++ b/src/main/java/spoon/support/compiler/jdt/JDTBatchCompiler.java @@ -199,6 +199,9 @@ public CompilationUnitDeclaration[] getUnits(List files) { environment, getHandlingPolicy(), compilerOptions, this.jdtCompiler.requestor, getProblemFactory(), this.out, null); + if (jdtCompiler.getEnvironment().getNoClasspath()) { + treeBuilderCompiler.lookupEnvironment.mayTolerateMissingType = true; + } CompilationUnitDeclaration[] units = treeBuilderCompiler .buildUnits(getCompilationUnits(files)); for (int i = 0; i < units.length; i++) {