diff --git a/spring-core-test/src/main/java/org/springframework/core/test/tools/TestCompiler.java b/spring-core-test/src/main/java/org/springframework/core/test/tools/TestCompiler.java index 9d5b15d1eb74..bb77051b9e7f 100644 --- a/spring-core-test/src/main/java/org/springframework/core/test/tools/TestCompiler.java +++ b/spring-core-test/src/main/java/org/springframework/core/test/tools/TestCompiler.java @@ -311,9 +311,7 @@ private DynamicClassLoader compile() { Errors errors = new Errors(); CompilationTask task = this.compiler.getTask(null, fileManager, errors, this.compilerOptions, null, compilationUnits); - if (!this.processors.isEmpty()) { - task.setProcessors(this.processors); - } + task.setProcessors(this.processors); boolean result = task.call(); if (!result || errors.hasReportedErrors()) { throw new CompilationException(errors.toString(), this.sourceFiles, this.resourceFiles);