-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
6
-
x86
-
windows_xp
A DESCRIPTION OF THE REQUEST :
When I refer to some class in javadoc-comment inside package-info.java (via @see or {@link...} tag), I must fully-qualify the class name, even it is a class inside the same package. This behaviour is documented in http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html:
"Search order for @see - the Javadoc tool will process a @see tag that appears in a source file (.java), package file (package.html or package-info.java) or overview file (overview.html). In the latter two files, you must fully-qualify the name you supply with @see..."
But it is very strange and inconvenient. I think that javadoc should process package-info.java by the same algorithm as all other java files in the package.
Could you correct javadoc utility so that it will understand the brief class names in @see and {@link...} tags inside package-info.java?
JUSTIFICATION :
Inconvenience: while creating package-info.java I must fully-qualify class name, unlike usual Java source files.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should be good if javadoc will understand the tag "@see Test", if Test.java is placed in the same package as package-info.java file.
ACTUAL -
Now javadoc does not process "@see Test in package-info.java and shows an error message in this situation.
---------- BEGIN SOURCE ----------
foo/Test.java:
----------
package foo;
public class Test {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
----------
foo/Test.java package-info.java:
----------
/**
Invalid link: {@link Test}.
Valid link: {@link foo.Test}.
@see Test
*/
package foo;
----------
---------- END SOURCE ----------
When I refer to some class in javadoc-comment inside package-info.java (via @see or {@link...} tag), I must fully-qualify the class name, even it is a class inside the same package. This behaviour is documented in http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/javadoc.html:
"Search order for @see - the Javadoc tool will process a @see tag that appears in a source file (.java), package file (package.html or package-info.java) or overview file (overview.html). In the latter two files, you must fully-qualify the name you supply with @see..."
But it is very strange and inconvenient. I think that javadoc should process package-info.java by the same algorithm as all other java files in the package.
Could you correct javadoc utility so that it will understand the brief class names in @see and {@link...} tags inside package-info.java?
JUSTIFICATION :
Inconvenience: while creating package-info.java I must fully-qualify class name, unlike usual Java source files.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should be good if javadoc will understand the tag "@see Test", if Test.java is placed in the same package as package-info.java file.
ACTUAL -
Now javadoc does not process "@see Test in package-info.java and shows an error message in this situation.
---------- BEGIN SOURCE ----------
foo/Test.java:
----------
package foo;
public class Test {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
----------
foo/Test.java package-info.java:
----------
/**
Invalid link: {@link Test}.
Valid link: {@link foo.Test}.
@see Test
*/
package foo;
----------
---------- END SOURCE ----------