aspose file tools*
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Javadoc Generation conflicts with interface given by Sun Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Javadoc Generation conflicts with interface given by Sun" Watch "Javadoc Generation conflicts with interface given by Sun" New topic
Author

Javadoc Generation conflicts with interface given by Sun

Ricardo Estafan
Ranch Hand

Joined: Mar 29, 2004
Posts: 84
Hi Guys,

i have a problem, i work with eclipse and use jalopy to format my code. When i generate javadoc for my CJD assignment it gives the following error messages :

C:\ontw\SCJD\code\suncertify\db\DBAccess.java:41: warning - @param argument "long" is not a parameter name.
C:\ontw\SCJD\code\suncertify\db\DBAccess.java:41: warning - @param argument "String[]" is not a parameter name.
C:\ontw\SCJD\code\suncertify\db\DBAccess.java:41: warning - @param argument "long" is not a parameter name.
C:\ontw\SCJD\code\suncertify\db\DBAccess.java:55: warning - @param argument "long" is not a parameter name.
C:\ontw\SCJD\code\suncertify\db\DBAccess.java:55: warning - @param argument "long" is not a parameter name.
C:\ontw\SCJD\code\suncertify\db\DBAccess.java:69: warning - @param argument "String[]" is not a parameter name.
C:\ontw\SCJD\code\suncertify\db\DBAccess.java:82: warning - @param argument "String[]" is not a parameter name.
C:\ontw\SCJD\code\suncertify\db\DBAccess.java:97: warning - @param argument "long" is not a parameter name.
C:\ontw\SCJD\code\suncertify\db\DBAccess.java:108: warning - @param argument "long" is not a parameter name.
C:\ontw\SCJD\code\suncertify\db\DBAccess.java:108: warning - @param argument "long" is not a parameter name.

These are all to be found in the DBAccess interface given by Sun. Is it a change in javadoc settings, to work around this problem, because i cannot change the interface....

Please help!!

Thanks!!
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11430
    
  85

Hi Ricardo,

You are not supposed to list the parameter type in your javadoc comments:



In my first example @param, I only listed the paramter name (index). This is correct.

In my second example @param I deliberately made the same mistake as you are currently doing: listing the type in the @param line. This is not needed by JavaDoc, and will cause the error you are seeing.

Regards, Andrew


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
Ricardo Estafan
Ranch Hand

Joined: Mar 29, 2004
Posts: 84
Hi Andrew,

i see your point but the problem is it is in the interface given by sun where these javadoc warnings are generated. Should i just remove the paramater type. Changing the interface given by Sun?
Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11430
    
  85

Hi Ricardo,

Are you saying that Sun provided you with an interface that already had JavaDoc comments? I had only seen provided interfaces with C++ comments.

If Sun did provide you with incorrect JavaDoc comments, then I would suggest you change the comments. However do not change the method signatures for the interface itself.

Regards, Andrew
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Javadoc Generation conflicts with interface given by Sun