-
Bug
-
Resolution: Fixed
-
P3
-
1.4.1
-
mantis
-
x86
-
linux, windows_2000
Name: nt126004 Date: 07/25/2002
FULL PRODUCT VERSION :
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-b
Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)
FULL OPERATING SYSTEM VERSION :
Microsoft Windows 2000 [Version 5.00.2195]
SP2
A DESCRIPTION OF THE PROBLEM :
JDK1.4.1 beta 1 attempts to fix the @inheritDoc regression
in 1.4.0 but is not yet functional. The code samples show
a method defined in an interface, an abstract class that
implements the interface, and a concrete class that extends
the abstract class.
Javadoc complains "warning - @inheritDoc used by bar
(double) does not override or implement any method".
According to my understanding of the rules, Javadoc should
find the original method declaration in the interface
implemented in the abstract class. If the concrete class
also explicitly implements the interface, the problem goes
away...but it should not be necessary to declare that
implementation.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run 1.4.1-B1 Javadoc on the provided source.
2.
3.
EXPECTED VERSUS ACTUAL BEHAVIOR :
------ extracted from Javadoc html output ------
bar
public void bar(double param1)This is the Javadoc for X2.bar
().
This is the second paragraph..
This implementation over-rides X2.bar().
Specified by:
bar in interface X2
Parameters:
param1 - A double.
------------
The above is produced if ConcreteX1X2 explicitly implements
X1 and X2.
If ConcreteX1X2 does not implement the interfaces, Javadoc
produces the warning shown previously, and hangs at 100%
busy. I am using Ant to drive the process; have not tried
Javadoc directly from the command line to see if this makes
a different on hanging the process.
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/**
* This is the Javadoc for interface X1.
*/
public interface X1
{
/**
* This is the Javadoc for X1.foo().
*
* <p>
* This is the second paragraph.
*
* @param param1 An integer.
*/
public void foo(int param1);
}
/**
* This is the Javadoc for interface X2.
*/
public interface X2
{
/**
* This is the Javadoc for X2.bar().
*
* <p>
* This is the second paragraph.
*
* @param param1 A double.
*/
public void bar(double param1);
}
/**
* This is the Javadoc for class AbstractX1X2.
*/
public abstract class AbstractX1X2 implements X1, X2
{
/**
* {@inheritDoc}.
*
* <p>This implementation over-rides X1.foo().
*/
public void foo(int param1)
{
}
}
/**
* This is the Javadoc for class ConcreteX1X2.
*/
public final class ConcreteX1X2 extends AbstractX1X2 //implements X1, X2
{
/*
* {@inheritDoc}.
*
* <p>This implementation over-rides AbstractX1X2.foo().
*
* @param param1 This description takes precedence.
*/
public void foo(int param1)
{
}
/**
* {@inheritDoc}.
*
* <p>This implementation over-rides X2.bar().
*/
public void bar(double param1)
{
}
}
---------- END SOURCE ----------
(Review ID: 159796)
======================================================================
- duplicates
-
JDK-4778264 {@inheritDoc} does not copy from interface definition properly, hangs
- Closed