Name: rmT116609 Date: 03/30/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
When I call the method getSuperClass on the StringBuilder i get a class AbstractStringBuilder instead of object. I also noticed that the AbstractStringBuilder contains methods with a corresponding signature, (see code below). Is the signature of the method changed or does the keyword volatile hide the method.
package java.lang;
import java.io.IOException;
import sun.misc.FloatingDecimal;
abstract class AbstractStringBuilder
implements Appendable, CharSequence
{
....
public AbstractStringBuilder append(CharSequence charsequence)
{
}
....
public AbstractStringBuilder append(char c)
{
}
....
public volatile Appendable append(char c)
throws IOException
{
}
public volatile Appendable append(CharSequence charsequence)
throws IOException
{
}
}
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
StringBuilder.class.getSuperclass()
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would expect the super class of the StringBuilder would be Object as indicated in the documentation
ACTUAL -
Super class StringBuilder: class java.lang.AbstractStringBuilder
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/*
* TestStringBuilder.java
*
* Created on March 30, 2004, 2:34 PM
*/
import java.lang.StringBuilder;
/**
*
* @author schenk_m
*/
public class TestStringBuilder {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.out.println("Super class StringBuilder: " +
StringBuilder.class.getSuperclass());
}
}
---------- END SOURCE ----------
(Incident Review ID: 245603)
======================================================================
###@###.### 10/20/04 22:46 GMT
FULL PRODUCT VERSION :
java version "1.5.0-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta-b32c)
Java HotSpot(TM) Client VM (build 1.5.0-beta-b32c, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows 2000 [Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
When I call the method getSuperClass on the StringBuilder i get a class AbstractStringBuilder instead of object. I also noticed that the AbstractStringBuilder contains methods with a corresponding signature, (see code below). Is the signature of the method changed or does the keyword volatile hide the method.
package java.lang;
import java.io.IOException;
import sun.misc.FloatingDecimal;
abstract class AbstractStringBuilder
implements Appendable, CharSequence
{
....
public AbstractStringBuilder append(CharSequence charsequence)
{
}
....
public AbstractStringBuilder append(char c)
{
}
....
public volatile Appendable append(char c)
throws IOException
{
}
public volatile Appendable append(CharSequence charsequence)
throws IOException
{
}
}
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
StringBuilder.class.getSuperclass()
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
I would expect the super class of the StringBuilder would be Object as indicated in the documentation
ACTUAL -
Super class StringBuilder: class java.lang.AbstractStringBuilder
REPRODUCIBILITY :
This bug can be reproduced always.
---------- BEGIN SOURCE ----------
/*
* TestStringBuilder.java
*
* Created on March 30, 2004, 2:34 PM
*/
import java.lang.StringBuilder;
/**
*
* @author schenk_m
*/
public class TestStringBuilder {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
System.out.println("Super class StringBuilder: " +
StringBuilder.class.getSuperclass());
}
}
---------- END SOURCE ----------
(Incident Review ID: 245603)
======================================================================
###@###.### 10/20/04 22:46 GMT
- relates to
-
JDK-4780441 stddoclet: Incorrectly documents inherited members from package-private class
- Resolved
-
JDK-6182000 StringBuilder javadoc doesn't match source code.
- Closed