JDK-4532612 : JavaDoc documents class files found on classpath
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 1.3.0
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2001-11-29
  • Updated: 2014-05-05
  • Resolved: 2001-12-08
Related Reports
Duplicate :  
Description

Name: rl43681			Date: 11/28/2001


java version "1.3.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0)
Java HotSpot(TM) Client VM (build 1.3.0, mixed mode)

I have a set of packages which contain a mixture of public classes and
internal classes in order to create javadoc for the public classes I copy
the java files of all the public classes into a seperate directory
"javadoc/src".

I then run javadoc specifying the -sourcepath to be "javadoc/src" and the
classpath to point to either the jar file of all my classes, or the root
directory containing my packages it doesn't matter which. It generates
documentation for all the .java files in "javadoc/src" but it also generates
documentation for some other classes which are not in the "javadoc/src"
directory. This is obviously a big problem as those classes are not public.

The documentation for the extra classes simply lists the public methods
and members, they have no comments associated with them even though these
classes are fully documented. This makes me think that javadoc is generating
documentation from .class files.

Also, not all classes in the package are documented, it only seems to be
those classes which are related, used by, or using the classes I do want to
document although I have not verified this absolutely.

If I do not specify the jar file containing my classes, or the root directory
containing my packages on the classpath then the problem goes away but instead
I get lots of errors because javadoc can not find the class files which makes
it difficult to see real problems with the javadoc.

I think that javadoc should only generate documentation for those .java files
which are in the source path. It is pointless to generate documentation from
.class files as they have had all the comments removed.
(Review ID: 136446) 
======================================================================

Comments
WORK AROUND Name: rl43681 Date: 11/28/2001 See above, not really a suitable work around as it has other problems. ======================================================================
11-06-2004

EVALUATION Closed out as a duplicate of 4548768. ###@###.### 2001-12-08
08-12-2001