-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.0
-
x86
-
linux
Name: krC82822 Date: 05/31/2001
java version "1.4.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)
Javadoc in 1.4 falsely reports warnings that were not reported in 1.3. It appears
to be caused by problems reading the list of imported classes.
"<method> declares that it throws <exception> but does not document it."
Example code:
package a;
public class A {
public static class E extends Exception {
}
}
package b;
import a.A;
public class B {
/** @exception A.E if an error occurs. */
public void test() throws A.E {
throw new A.E();
}
}
javadoc in 1.4 reports:
javadoc: warning - Method b.B.test
declares that it throws a.A.E,
but does not document it.
javadoc in 1.3 does not report the warning.
However, both versions create the correctly linked javadocs for the exception
concerned.
-------------
subsequent email from user:
The warning disappears if you change B.java to:
package b;
import a.A;
public class B {
/** @exception a.A.E if an error occurs. */
public void test() throws A.E {
throw new A.E();
}
}
(i.e. fully qualify the exception class to a.A.E)
Thus, it's a problem with the 1.4 javadoc not knowing that A.E is also
imported with the statement:
import a.A;
(Review ID: 125035)
======================================================================
- duplicates
-
JDK-4464315 stddoclet: undesirable warning generated for inherited exception doc
-
- Closed
-