6973626: test/tools/javac/processing/* tests fail with assertions enabled

Mon, 02 Aug 2010 16:29:54 -0700

author
jjg
date
Mon, 02 Aug 2010 16:29:54 -0700
changeset 623
6318230cdb82
parent 622
38e2c23309f1
child 624
186feb2042f0
child 629
0fe472f4a332

6973626: test/tools/javac/processing/* tests fail with assertions enabled
Reviewed-by: darcy

src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Mon Aug 02 13:35:39 2010 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Mon Aug 02 16:29:54 2010 -0700
     1.3 @@ -900,11 +900,11 @@
     1.4  
     1.5          /** Run a processing round. */
     1.6          void run(boolean lastRound, boolean errorStatus) {
     1.7 -            assert lastRound
     1.8 -                ? (topLevelClasses.size() == 0 && annotationsPresent.size() == 0)
     1.9 -                : (errorStatus == false);
    1.10 -
    1.11 -            printRoundInfo(topLevelClasses, annotationsPresent, lastRound);
    1.12 +//            assert lastRound
    1.13 +//                ? (topLevelClasses.size() == 0 && annotationsPresent.size() == 0)
    1.14 +//                : (errorStatus == false);
    1.15 +//
    1.16 +//            printRoundInfo(topLevelClasses, annotationsPresent, lastRound);
    1.17  
    1.18              TaskListener taskListener = context.get(TaskListener.class);
    1.19              if (taskListener != null)
    1.20 @@ -912,6 +912,7 @@
    1.21  
    1.22              try {
    1.23                  if (lastRound) {
    1.24 +                    printRoundInfo(List.<ClassSymbol>nil(), Collections.<TypeElement>emptySet(), lastRound);
    1.25                      filer.setLastRound(true);
    1.26                      Set<Element> emptyRootElements = Collections.emptySet(); // immutable
    1.27                      RoundEnvironment renv = new JavacRoundEnvironment(true,
    1.28 @@ -920,6 +921,7 @@
    1.29                              JavacProcessingEnvironment.this);
    1.30                      discoveredProcs.iterator().runContributingProcs(renv);
    1.31                  } else {
    1.32 +                    printRoundInfo(topLevelClasses, annotationsPresent, lastRound);
    1.33                      discoverAndRunProcs(context, annotationsPresent, topLevelClasses, packageInfoFiles);
    1.34                  }
    1.35              } finally {
    1.36 @@ -947,7 +949,7 @@
    1.37                  boolean lastRound) {
    1.38              if (printRounds || verbose) {
    1.39                  log.printNoteLines("x.print.rounds",
    1.40 -                        number,
    1.41 +                        (!lastRound ? number : number + 1),
    1.42                          "{" + topLevelClasses.toString(", ") + "}",
    1.43                          annotationsPresent,
    1.44                          lastRound);

mercurial