Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 4320557
Votes 1
Synopsis Doclet API: Automatically add values of static fields to generated docs
Category doclet:tbd
Reported Against 1.2 , 1.2.2
Release Fixed
State 11-Closed, duplicate of 4478115, request for enhancement
Priority: 3-Medium
Related Bugs 4268000 , 4478115
Submit Date 10-MAR-2000
Description
The values of static final fields must be specified in the API specification. 
Until now we have relied on developers writing in the values by hand in the 
body of the doc comments, which very few do.

More technically, we would publish the value for: (according to Josh)

  All primitive and String final static fields that are 
  initialized to compile-time constant expressions. 

To ensure that this be done accurately, Javadoc should automate this,
inserting the value in the generated output.

This needs to be done for both the standard and MIF doclets.

Note that the implementation should be sure to specify the values for 
private and package-private static final fields in those cases when the 
user supplies the -private or -package flags to javadoc.  

Once this is done, we should create a doc bug report to remove the
manually-added values from the comment bodies.

If the value is added to the signature, it may be necessary to modify the
localization pre-process doclet to strip off the value, because the
signature is used as a key in the comment (.cmnt) file to uniquely
identify the comment.
Work Around
N/A
Evaluation
Necessary for debugging (by developers), compatible implementations (by licensees), and compliance testing (by Java Compatibility Tests).

It appears this requires an addition to the Doclet API to get the field value.
 xxxxx@xxxxx  2000-09-06

Re-opening the bug marked INT, as verification fails. Followed is the correspondence I had with the developer.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Vijayan R A wrote:
> I am in the process of verifying the fix/Integration. I wrote a simple test
> case,
> 
> jtools-sqe:/vijayan/newchild/regression/T4320557 120 % more Test.java
> /**
>  * Class Test
>  */
> public class Test
> {
>         public  static final int        fIntField = 1;
> }

Your test is correct, but 4478115 is preventing this from working properly yet.
That bug should probably not have been marked fixed/integrated yet.

-Neal
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

 xxxxx@xxxxx  2001-08-07

I am closing this, as the standard doclet work is completed and 4478115 remains
open to track the remaining problem.

 xxxxx@xxxxx  2001-08-07
Comments
  
  Include a link with my name & email   

Submitted On 19-DEC-2001
foust
This is a nice feature, but it should also work for 
Interface fields (which are public static final by default).
The current JDK 1.4 javadoc only generates constants for 
classes (not interfaces).



PLEASE NOTE: JDK6 is formerly known as Project Mustang