JDK-6872011 : Update printing processor to support JSR 308
  • Type: Bug
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-08-14
  • Updated: 2012-01-13
  • Resolved: 2012-01-13
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.
JDK 7
7 b72Fixed
Related Reports
Relates :  
Relates :  
Description
JSR 308 adds the ability to annotate type parameters.  The printing processor, used to implement "javac -Xprint" as well as javax.lang.model.util.Elements.printElements, should be updated to print annotations to those locations too.

Comments
SUGGESTED FIX # http://hg.openjdk.java.net/jdk7/tl/langtools/rev/40aca381dcaf # HG changeset patch # User darcy # Date 1251243692 25200 # Node ID 40aca381dcaf80433c1b046ffca0f883aed90a58 # Parent c863e90091ee0cd8385b33de09be7f7765ae675f 6872011: Update printing processor to support JSR 308 Reviewed-by: jjg --- a/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java Mon Aug 24 14:38:42 2009 -0700 +++ b/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java Tue Aug 25 16:41:32 2009 -0700 @@ -48,7 +48,8 @@ import java.util.*; * deletion without notice.</b> */ @SupportedAnnotationTypes("*") -@SupportedSourceVersion(SourceVersion.RELEASE_6) +// TODO: Change to version 7 based visitors when available +@SupportedSourceVersion(SourceVersion.RELEASE_7) public class PrintingProcessor extends AbstractProcessor { PrintWriter writer; @@ -374,6 +375,7 @@ public class PrintingProcessor extends A for(TypeParameterElement tpe: typeParams) { if (!first) writer.print(", "); + printAnnotationsInline(tpe); writer.print(tpe.toString()); first = false; }
14-08-2009

EVALUATION A fine idea.
14-08-2009