changeset 647:6318230cdb82

6973626: test/tools/javac/processing/* tests fail with assertions enabled Reviewed-by: darcy
author jjg
date Mon, 02 Aug 2010 16:29:54 -0700
parents 38e2c23309f1
children 186feb2042f0 0fe472f4a332
files src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
diffstat 1 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Mon Aug 02 13:35:39 2010 -0700
+++ b/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);