JDK-4252701 : RFE: getCodeBase() and getDocumentBase() do not behave as documented
  • Type: Enhancement
  • Component: docs
  • Sub-Component: guides
  • Affected Version: 1.2.1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 1999-07-08
  • Updated: 2002-01-29
  • Resolved: 2002-01-29
Related Reports
Duplicate :  
Description

Name: rlT66838			Date: 07/08/99


The API docs for the Applet class claim that the
getDocumentBase() method returns "the URL of the document in
which the Applet is embedded."  What it actually seems to do is
to return the URL of the directory in which the document resides.
The actual behavior seems more in line with the method name (and
more useful), but does not agree with the docs.

Similarly, the docs for the getCodeBase() method claim that it
returns "the URL of the applet itself."  What it actually seems
to do is to return the value of the codebase parameter from the
applet tag if that was specified, or the same value as
getDocumentBase() otherwise.  Again, the actual behavior seems
more appropriate than that described by the documentation.

Version info:

D:\work\JaMM_2.0>java -version
java version "1.2.1"
Classic VM (build JDK-1.2.1-A, native threads)

D:\work\JaMM_2.0>java -fullversion
java full version "JDK-1.2.1-A"
(Review ID: 85379) 
======================================================================

Comments
EVALUATION I've started investigating this, and will resolve the issue soon. scott.hommel@eng 2001-05-22 It turns out that this bug is closely related to appletviewer bug 4456393. When that bug is fixed, the javadoc in question will also be fixed. I'm closing this as a duplicate. ###@###.### 2002-01-29
29-01-2002