United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4920381 : REGRESSION: Tag name containing dash not allowed

Details
Type:
Bug
Submit Date:
2003-09-10
Status:
Resolved
Updated Date:
2014-05-05
Project Name:
JDK
Resolved Date:
2003-11-23
Component:
tools
OS:
generic,windows_xp,windows_2000
Sub-Component:
javadoc(tool)
CPU:
x86,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.2
Fixed Versions:
5.0 (b30)

Related Reports
Duplicate:
Duplicate:

Sub Tasks

Description
Problem submitted to Javadoc Forum
http://forum.java.sun.com/thread.jsp?forum=41&thread=432943&tstart=0&trange=50

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.



                                    

Comments
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.
>
> ###@###.### 
                                     
2004-06-25
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger
tiger-beta

FIXED IN:
tiger-beta

INTEGRATED IN:
tiger-b30
tiger-beta


                                     
2004-06-25
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
                                     
2004-06-25
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
                                     
2003-09-10



Hardware and Software, Engineered to Work Together