• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javadoc Generation conflicts with interface given by Sun

 
Ricardo Estafan
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 11886
198
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ricardo Estafan
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 11886
198
C++ Firefox Browser IntelliJ IDE Java Mac Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic