Bug 22645

Summary: String java.lang.Long.toHexString(long) drops digits
Product: classpath Reporter: from-classpath
Component: classpathAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: bug-classpath
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed:

Description from-classpath 2002-07-22 20:46:36 UTC
The following only prints 8 digits:

class x
{
    static public void main( String[] args )
    {
        System.out.println( Long.toHexString(0xffffffffffffffffL) );
    }
}
Comment 1 from-classpath 2002-07-22 22:32:52 UTC
Could you give us the version of Classpath you use and the compiler and VM? I tried with the current CVS version of Classpath with jikes 1.16 and Kissme from CVS and with gcj-3.1 (which uses the same Long class) and both print the correct number (16) of 'f's.
Comment 2 from-classpath 2002-07-23 00:01:21 UTC
OK. Tried with Classpath 0.04 and the bug is in that version.  But it has already been fixed in CVS by Tom Tromey so if you need the bug fix you might want to get the file Long.java from CVS:
http://savannah.gnu.org/cgi-bin/viewcvs/classpath/classpath/java/lang/Long.java
(has a download link)

Jikes can be found through http://www.jikes.org/, gcj is distributed with the Gnu Compiler Collection (gcc), more info can be found at http://gcc.gnu.org/java/