Bug 28559 - @deprecated has to be at the beginning of the comment line
Summary: @deprecated has to be at the beginning of the comment line
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-17 15:36 EST by Olivier Thomann CLA
Modified: 2003-02-07 11:31 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2002-12-17 15:36:10 EST
Using 1216, we should not report a deprecation warning if the @deprecated tag is
preceeded with something else than whitespaces or '*'.
Compiling the following code should not add a deprecated attribute to the class:

[
/**
 * this should not be here @deprecated
 */
class A {}
]
Comment 1 Philipe Mulet CLA 2002-12-17 17:10:35 EST
Please find some official confirmation of this behavior
Comment 2 Olivier Thomann CLA 2002-12-18 08:24:41 EST
This is stated in the javadoc specs. Any tag has to be at the beginning of the 
line preceeded only with whitespaces and/or a asterisk.
From this link:
http://java.sun.com/j2se/1.4/docs/tooldocs/windows/javadoc.html

Standalone and in-line tags - A tag is a special keyword within a doc comment 
that the Javadoc tool can process. The Javadoc tool has standalone tags, which 
appear as @tag, and in-line tags, which appear within braces, as {@tag}. To be 
interpreted, a standalone tag must appear at the beginning of a line, ignoring 
leading asterisks, white space, and separator (/**). This means you can use the 
@ character elsewhere in the text and it will not be interpreted as the start 
of a tag. If you want to start a line with the @ character and not have it be 
interpreted, use the HTML entity @. Each standalone tag has associated 
text, which includes any text following the tag up to, but not including, 
either the next tag, or the end of the doc comment. This associated text can 
span multiple lines. An in-line tag is allowed and interpreted anywhere that 
text is allowed. The following example contains the standalone tag @deprecated 
and in-line tag {@link}.
Comment 3 Olivier Thomann CLA 2003-01-07 16:42:09 EST
Fixed and released in 2.1 stream.
Comment 4 David Audel CLA 2003-02-07 11:31:55 EST
Verified.