United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-4720957 : -link and -linkoffline creates wrong link to ../../../http://

Details
Type:
Bug
Submit Date:
2002-07-25
Status:
Resolved
Updated Date:
2002-10-25
Project Name:
JDK
Resolved Date:
2002-10-25
Component:
docs
OS:
windows_nt,windows_2000
Sub-Component:
doclet
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.4.1
Fixed Versions:
1.4.2 (mantis)

Related Reports
Duplicate:
Duplicate:
Duplicate:

Sub Tasks

Description

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-beta-b14)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)

FULL OPERATING SYSTEM VERSION : Microsoft Windows 2000
[Version 5.00.2195]


A DESCRIPTION OF THE PROBLEM :
When using the -link or the -linkoffline option of the
javadoc tool distributed with SDK 1.4.1 beta the href links
are created wrong.

EXAMPLE:
---------
USING 1.4.1 BETA:
------------------------
at command line I type:
c:\java\j2sdk1.4.1\bin\javadoc.exe -linkoffline
http://java.sun.com/j2se/1.4/docs/api/ .\tmp -d doc\api -
sourcepath .\src -package com.spm.anttry

And the resulting javadocs contains the link to
java.lang.Object as:
<A
HREF="../../../http://java.sun.com/j2se/1.4/docs/api/java/la
ng/Object.html">java.lang.Object</A>

USING 1.4.0
------------
When i do EXACTLY the same using SDK v 1.4.0 i.e.
At cmd line I type:
c:\java\j2sdk1.4.0\bin\javadoc.exe -linkoffline
http://java.sun.com/j2se/1.4/docs/api/ .\tmp -d doc\api -
sourcepath .\src -package com.spm.anttry

the resulting link to java.lang.Object is:
<A
HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object
.html">java.lang.Object</A>

REGRESSION.  Last worked in version 1.4

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Use the -link or -linkoffline option of the javadoc tool
2. Steps I used is described in the "DESCRIPTION"
3.

EXPECTED VERSUS ACTUAL BEHAVIOR :
the links are created as if it is linking to a file located
at the root of my current drive. Should link to the url.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
//The following is the single java class i used when i got the error
//FileName: HelloWorld.java

package com.spm.anttry;
/*
 *  HelloWorld.java
 *  My first java program
 */

public class HelloWorld {
    /**
     * Print "Hello World"
     */
    public void sayHello() {
          System.out.println("Hello World");
      }

    /**
     * Test
     */
    public static void main( String[] args ) {
        HelloWorld world = new HelloWorld();
        world.sayHello();
    }
}

---------- END SOURCE ----------

CUSTOMER WORKAROUND :
use JDK v. 1.4.0
(Review ID: 159740) 
======================================================================

                                    

Comments
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
mantis

FIXED IN:
mantis

INTEGRATED IN:
mantis
mantis-b05


                                     
2004-06-14
EVALUATION

Once fixed, this needs a regression test.
###@###.### 2002-07-25

The -linkoffline option broke when this bug was fixed for merlin 4492579 
(-linkoffline broken when first arg is relative).  The -linkoffline option now checks if the first arg is a file path or URL.  Then, it links
to external classes the appropriate way.

###@###.### 2002-07-26
                                     
2002-07-26
PUBLIC COMMENTS

The -linkoffline option broke when this bug was fixed for merlin 4492579 
(-linkoffline broken when first arg is relative).  The -linkoffline option now checks if the first arg is a file path or URL.  Then, it links
to external classes the appropriate way.

###@###.### 2002-07-26
                                     
2002-07-26



Hardware and Software, Engineered to Work Together