-
Bug
-
Resolution: Duplicate
-
P3
-
None
-
1.4.0
-
sparc
-
solaris_9
Consider the following two files, test.java and second.java.
------------------------------------------------------------
jtools-sqe:/home/vr128054/vertest/work 259 % more test.java
public class test
{
public final void doNothing ()
{
}
}
jtools-sqe:/home/vr128054/vertest/work 260 % more second.java
public class second extends test
{
public void doNothing ()
{
}
}
Find the compiler's behaviour when tried to compile..
-----------------------------------------------------
jtools-sqe:/home/vr128054/vertest/work 261 % javac *.java
second.java:3: doNothing() in second cannot override doNothing() in test; overridden method is final
public void doNothing ()
^
1 error
Find Javadoc's behaviour below.
-------------------------------
jtools-sqe:/home/vr128054/vertest/work 262 % javadoc *.java
Loading source file second.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 second.html...
Generating test.html...
Generating package-list...
Generating help-doc.html...
Generating stylesheet.css...
Javadoc should not accept these classes. Should throw an error.
------------------------------------------------------------
jtools-sqe:/home/vr128054/vertest/work 259 % more test.java
public class test
{
public final void doNothing ()
{
}
}
jtools-sqe:/home/vr128054/vertest/work 260 % more second.java
public class second extends test
{
public void doNothing ()
{
}
}
Find the compiler's behaviour when tried to compile..
-----------------------------------------------------
jtools-sqe:/home/vr128054/vertest/work 261 % javac *.java
second.java:3: doNothing() in second cannot override doNothing() in test; overridden method is final
public void doNothing ()
^
1 error
Find Javadoc's behaviour below.
-------------------------------
jtools-sqe:/home/vr128054/vertest/work 262 % javadoc *.java
Loading source file second.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 second.html...
Generating test.html...
Generating package-list...
Generating help-doc.html...
Generating stylesheet.css...
Javadoc should not accept these classes. Should throw an error.
- duplicates
-
JDK-4494500 javadoc spec: doesn't say how to handle erroneous input
-
- Closed
-