-
Bug
-
Resolution: Fixed
-
P3
-
1.4.2
-
b61
-
x86
-
windows_2000, windows_xp
Name: rmT116609 Date: 07/22/2004
FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Server VM (build 1.4.2-b28, mixed mode)
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Using javadoc with standard doclet.
A DESCRIPTION OF THE PROBLEM :
Using javadoc on sources which include constant values produce faulty "Constant Values Page" html code under specific conditions. It seems that String constants values including "<" or ">" are copied into the html page let browser interpret them partly as html tag.
For example will the constant declaration:
public static final String DEMO_STRING = "<Hello World>"
be shown in the Constant Value Page as DEMO_STRING= ""
Furthermore will the constant declaration:
public static final String DEMO_STRING = "<table>Hello World"
disturb the allignment of the page in the browser.
As it seems to me, there could be many more strange effects be generated with constants including "<" or ">".
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just declare an string constant in a class including "<" like DEMO ="y<abs(x)" and let javadoc tool produce with the standard doclet the html pages. View the resulting "Constant Field Values" page , the constant value for DEMO looks like "y
The rest of the constant value is cut off.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The constant value "y<abs(x)" should be displayed in the browser.
ACTUAL -
The result in the browser is "y
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/*
* DemoClass.java
*/
package de.prowaznik;
public class DemoClass {
/** Test constant. */
public static final String DEMO= "y<abs(x)";
/** Connection URL for the JDBC Driver. */
public static final String THIS_IS_OK= "y < abs(x)";
public DemoClass() {
}
}
---------- END SOURCE ----------
(Incident Review ID: 286161)
======================================================================
FULL PRODUCT VERSION :
java version "1.4.2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2-b28)
Java HotSpot(TM) Server VM (build 1.4.2-b28, mixed mode)
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
EXTRA RELEVANT SYSTEM CONFIGURATION :
Using javadoc with standard doclet.
A DESCRIPTION OF THE PROBLEM :
Using javadoc on sources which include constant values produce faulty "Constant Values Page" html code under specific conditions. It seems that String constants values including "<" or ">" are copied into the html page let browser interpret them partly as html tag.
For example will the constant declaration:
public static final String DEMO_STRING = "<Hello World>"
be shown in the Constant Value Page as DEMO_STRING= ""
Furthermore will the constant declaration:
public static final String DEMO_STRING = "<table>Hello World"
disturb the allignment of the page in the browser.
As it seems to me, there could be many more strange effects be generated with constants including "<" or ">".
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Just declare an string constant in a class including "<" like DEMO ="y<abs(x)" and let javadoc tool produce with the standard doclet the html pages. View the resulting "Constant Field Values" page , the constant value for DEMO looks like "y
The rest of the constant value is cut off.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The constant value "y<abs(x)" should be displayed in the browser.
ACTUAL -
The result in the browser is "y
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/*
* DemoClass.java
*/
package de.prowaznik;
public class DemoClass {
/** Test constant. */
public static final String DEMO= "y<abs(x)";
/** Connection URL for the JDBC Driver. */
public static final String THIS_IS_OK= "y < abs(x)";
public DemoClass() {
}
}
---------- END SOURCE ----------
(Incident Review ID: 286161)
======================================================================
- duplicates
-
JDK-6183723 Constant field values page is not displayed correctly if values are XML tags.
- Closed