-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.0
-
sparc
-
solaris_9
Javadoc accepts abstract methods with body.
Find the code attached below.
------------------------------
jtools-sqe:/home/vr128054/vertest/work 221 % more test.java
public abstract class test
{
public abstract void testOne ()
{
System.out.println ("Get Errors");
}
}
Checking the javac, javadoc for their builds ...
-------------------------------------------------
jtools-sqe:/home/vr128054/vertest/work 222 % javac -J-version
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b76)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b76, mixed mode)
jtools-sqe:/home/vr128054/vertest/work 223 % javadoc -J-version
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b76)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b76, mixed mode)
Results with Javac,
-------------------
jtools-sqe:/home/vr128054/vertest/work 224 % javac test.java
test.java:3: abstract methods cannot have a body
public abstract void testOne ()
^
1 error
results with Javadoc
--------------------
jtools-sqe:/home/vr128054/vertest/work 225 % javadoc test.java
Loading source file test.java...
Constructing Javadoc information...
Standard Doclet version 1.4 beta (04 Aug 2001)
Building tree for all the packages and classes...
Building index for all the packages and classes...
Generating overview-tree.html...
Generating index-all.html...
Generating deprecated-list.html...
Building index for all classes...
Generating allclasses-frame.html...
Generating allclasses-noframe.html...
Generating index.html...
Generating packages.html...
Generating test.html...
Generating package-list...
Generating help-doc.html...
Generating stylesheet.css...
While it is perfectly agreeable and valid to skip the body of a method in a syntactially correct class, processing and documenting a class with cases violating JLS is wrong. Needs a fix.
Find the code attached below.
------------------------------
jtools-sqe:/home/vr128054/vertest/work 221 % more test.java
public abstract class test
{
public abstract void testOne ()
{
System.out.println ("Get Errors");
}
}
Checking the javac, javadoc for their builds ...
-------------------------------------------------
jtools-sqe:/home/vr128054/vertest/work 222 % javac -J-version
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b76)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b76, mixed mode)
jtools-sqe:/home/vr128054/vertest/work 223 % javadoc -J-version
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b76)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b76, mixed mode)
Results with Javac,
-------------------
jtools-sqe:/home/vr128054/vertest/work 224 % javac test.java
test.java:3: abstract methods cannot have a body
public abstract void testOne ()
^
1 error
results with Javadoc
--------------------
jtools-sqe:/home/vr128054/vertest/work 225 % javadoc test.java
Loading source file test.java...
Constructing Javadoc information...
Standard Doclet version 1.4 beta (04 Aug 2001)
Building tree for all the packages and classes...
Building index for all the packages and classes...
Generating overview-tree.html...
Generating index-all.html...
Generating deprecated-list.html...
Building index for all classes...
Generating allclasses-frame.html...
Generating allclasses-noframe.html...
Generating index.html...
Generating packages.html...
Generating test.html...
Generating package-list...
Generating help-doc.html...
Generating stylesheet.css...
While it is perfectly agreeable and valid to skip the body of a method in a syntactially correct class, processing and documenting a class with cases violating JLS is wrong. Needs a fix.
- duplicates
-
JDK-4494500 javadoc spec: doesn't say how to handle erroneous input
-
- Closed
-
- relates to
-
JDK-4494406 javadoc works with native methods with body
-
- Closed
-
-
JDK-4494409 javadoc works with native methods with body
-
- Closed
-