-
Bug
-
Resolution: Fixed
-
P4
-
1.2.0
-
beta
-
x86
-
windows_nt
Name: chT40241 Date: 12/08/98
Create Test.java (below) and compile it and run javadoc:
javac Test.java
javadoc Test.java
You get one diagnostic:
javadoc: warning - Method Test.m1
documents that it throws java.io.IOException,
but does not declare it.
which is incomplete.
m0 throws IOException but does not document it.
m2 throws Exception but documents IOException.
Note that javadoc in jdk 1.1.7 diagnoses:
Method void m2()
declares that it throws class java.lang.Exception,
but there is no corresponding @exception item
which is also incomplete.
public class Test {
/**
* m0 throws IOException but does not document it.
*/
public void m0() throws java.io.IOException { }
/**
* m1 does not throw IOException but does documents it.
* @exception java.io.IOException is never thrown
*/
public void m1() { }
/**
* m2 does throws Exception but documents that it throws IOException
* @exception java.io.IOException is incorrectly documented
*/
public void m2() throws java.lang.Exception { }
}
======================================================================