### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: batch/org/eclipse/jdt/internal/compiler/batch/Main.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/batch/org/eclipse/jdt/internal/compiler/batch/Main.java,v retrieving revision 1.300 diff -u -r1.300 Main.java --- batch/org/eclipse/jdt/internal/compiler/batch/Main.java 7 May 2007 17:01:22 -0000 1.300 +++ batch/org/eclipse/jdt/internal/compiler/batch/Main.java 23 May 2007 15:12:40 -0000 @@ -2156,11 +2156,6 @@ return; } - // enable annotation processing by default in batch mode: 185768 - this.options.put( - CompilerOptions.OPTION_Process_Annotations, - CompilerOptions.ENABLED); - final int INSIDE_CLASSPATH_start = 1; final int INSIDE_DESTINATION_PATH = 3; final int INSIDE_TARGET = 4; @@ -3864,6 +3859,12 @@ throw new InvalidInputException(this.bind("configure.incompatibleComplianceForSource", (String)this.options.get(CompilerOptions.OPTION_Compliance), CompilerOptions.VERSION_1_4)); //$NON-NLS-1$ } + // Enable annotation processing by default in batch mode when compliance is at least 1.6 + // see bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=185768 + if (CompilerOptions.versionToJdkLevel(compliance) >= ClassFileConstants.JDK1_6) { + this.options.put(CompilerOptions.OPTION_Process_Annotations, CompilerOptions.ENABLED); + } + // check and set compliance/source/target compatibilities if (this.didSpecifyTarget) { final Object targetVersion = this.options.get(CompilerOptions.OPTION_TargetPlatform);