JDK-5095716 : RoundState.finalRound computed improperly
  • Type: Bug
  • Component: tools
  • Sub-Component: apt
  • Affected Version: 5.0u1
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2004-09-01
  • Updated: 2012-10-09
  • Resolved: 2004-09-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other JDK 6
5.0u1 01Fixed 6Fixed
Related Reports
Relates :  
Relates :  
Description
The current implementation of RoundState.finalRound improperly says a round is not the final round if a class files has be written out.  In the default mode of operation, only writing out a source file will trigger another round of processing.

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: 1.5.0_01 mustang FIXED IN: 1.5.0_01 mustang INTEGRATED IN: 1.5.0_01 mustang
26-09-2004

SUGGESTED FIX src/share/classes/com/sun/tools/apt/mirror/apt>sccs sccsdiff -r1.1 -r1.2 RoundStateImpl.java ------- RoundStateImpl.java ------- 10a11 > import java.util.Map; 20,26c21,37 < boolean classFilesCreated) { < this.finalRound = errorRaised || < !(sourceFilesCreated || < classFilesCreated); < this.errorRaised = errorRaised; < this.sourceFilesCreated = sourceFilesCreated; < this.classFilesCreated = classFilesCreated; --- > boolean classFilesCreated, > Map<String,String> options) { > /* > * In the default mode of operation, this round is the final > * round if an error was raised OR there were no new source > * files generated. If classes are being treated as > * declarations, this is the final round if an error was > * raised OR neither new source files nor new class files were > * generated. > */ > this.finalRound = > errorRaised || > (!sourceFilesCreated && > !(classFilesCreated && options.keySet().contains("-XclassesAsDecls")) ); > this.errorRaised = errorRaised; > this.sourceFilesCreated = sourceFilesCreated; > this.classFilesCreated = classFilesCreated; src/share/classes/com/sun/tools/apt/mirror/apt>sccs sccsdiff -r1.10 -r1.11 AnnotationProcessorEnvironmentImpl.java ------- AnnotationProcessorEnvironmentImpl.java ------- 158c158,159 < filer.getClassFileNames().size() > 0); --- > filer.getClassFileNames().size() > 0, > origOptions); ###@###.### 2004-09-16
16-09-2004

EVALUATION A fine idea. ###@###.### 2004-09-01
01-09-2004