6973626: test/tools/javac/processing/* tests fail with assertions enabled
authorjjg
Mon, 02 Aug 2010 16:29:54 -0700
changeset 6162 9d0f96b4befa
parent 6161 ab857bfb695a
child 6163 157fbe5f1e56
child 6342 228b73431edb
6973626: test/tools/javac/processing/* tests fail with assertions enabled Reviewed-by: darcy
langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Mon Aug 02 13:35:39 2010 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Mon Aug 02 16:29:54 2010 -0700
@@ -900,11 +900,11 @@
 
         /** Run a processing round. */
         void run(boolean lastRound, boolean errorStatus) {
-            assert lastRound
-                ? (topLevelClasses.size() == 0 && annotationsPresent.size() == 0)
-                : (errorStatus == false);
-
-            printRoundInfo(topLevelClasses, annotationsPresent, lastRound);
+//            assert lastRound
+//                ? (topLevelClasses.size() == 0 && annotationsPresent.size() == 0)
+//                : (errorStatus == false);
+//
+//            printRoundInfo(topLevelClasses, annotationsPresent, lastRound);
 
             TaskListener taskListener = context.get(TaskListener.class);
             if (taskListener != null)
@@ -912,6 +912,7 @@
 
             try {
                 if (lastRound) {
+                    printRoundInfo(List.<ClassSymbol>nil(), Collections.<TypeElement>emptySet(), lastRound);
                     filer.setLastRound(true);
                     Set<Element> emptyRootElements = Collections.emptySet(); // immutable
                     RoundEnvironment renv = new JavacRoundEnvironment(true,
@@ -920,6 +921,7 @@
                             JavacProcessingEnvironment.this);
                     discoveredProcs.iterator().runContributingProcs(renv);
                 } else {
+                    printRoundInfo(topLevelClasses, annotationsPresent, lastRound);
                     discoverAndRunProcs(context, annotationsPresent, topLevelClasses, packageInfoFiles);
                 }
             } finally {
@@ -947,7 +949,7 @@
                 boolean lastRound) {
             if (printRounds || verbose) {
                 log.printNoteLines("x.print.rounds",
-                        number,
+                        (!lastRound ? number : number + 1),
                         "{" + topLevelClasses.toString(", ") + "}",
                         annotationsPresent,
                         lastRound);