JDK-4920381 : REGRESSION: Tag name containing dash not allowed
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.4.2
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic,windows_2000,windows_xp
  • CPU: generic,x86
  • Submitted: 2003-09-10
  • Updated: 2014-05-05
  • Resolved: 2003-11-23
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.
5.0 b30Fixed
Related Reports
Duplicate :  
Duplicate :  
Problem submitted to Javadoc Forum

If I understand right the documentation, there is a major change
in the behaviour of the -tag option between 1.4.1 and 1.4.2:

New feature: The -tag option now allows dash (-) separator for xdoclet
              tags like @ejb:bean (4750173, stddoclet)

I had a minus (-) in the text which should replace the custom tag
(a range of years like 1983-2003).
I called javadoc like this:
jdk142/bin/javadoc.exe -tag my.tag:t:A-B" class1.java

But I get now the following messages:
class1.java:2: warning - @my.tag is an unknown tag.
Note: Custom tags that were not seen: @my.tag:t:A

What is the best way to pass a '-'?
It should also work with ant because I use it to generate my documentation.

CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger tiger-beta FIXED IN: tiger-beta INTEGRATED IN: tiger-b30 tiger-beta

WORK AROUND The only workaround that I know of is to write your own taglet instead of using the -tag option. Here is what I would use: import com.sun.tools.doclets.standard.tags.SimpleTaglet; public class Foo extends SimpleTaglet { public Foo() { super("my-tag", "My Tag:", "a"); } } Then, when you run Javadoc, use: -taglet <qualified name of your taglet> -tagletpath <path to your taglet> I don't have time to test this code, but I believe it will work. -Jamie

PUBLIC COMMENTS Fixed. From now on, if you want to include a ":" in your taglet name, you cannot do so by using "-" as an alternate separator. You must escape with "\". Therefore, "-" can now be used in a taglet name. ###@###.### 2003-11-15 ###@###.### wrote: In other words: > We no longer support dashes as seperators for the tag option. The colon > is ALWAYS the seperator. If the user wants a colon in their tag name, > they have to escape it using the back slash. > For example: > > -tag ejb\:bean:Beah:a > > The above tag would work for this doc comment: > > /** > * Comment > * > * @ejb:bean > */ > > It was a bad idea to use an alternate seperator. That just introduces a > different bug. I think escaping is the right fix. > > ###@###.###

EVALUATION ###@###.### wrote: Here is the bug you are running into: String seperator = args[1].indexOf(TagletManager.ALT_SIMPLE_TAGLET_OPT_SEPERATOR) == -1 ? TagletManager.SIMPLE_TAGLET_OPT_SEPERATOR : TagletManager.ALT_SIMPLE_TAGLET_OPT_SEPERATOR; The doclet assumes that the seperator is "-" instead of ":". This code was added in 1.4.2 t support tags like @my:tag. I don't think anyone knew that people used tags like @my-tag. This will have to be fixed in 1.5. See the workaround. ###@###.### 2003-09-10 Fixed. ###@###.### 2003-11-15