Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4390434

JCK: lang/EXPR/expr348/expr34801/expr34801.html fails in Server comp mode

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 1.3.1
    • 1.3.1
    • hotspot
    • beta
    • x86, sparc
    • generic, linux, windows_98
    • Verified


      JCK 1.3 test lang/EXPR/expr348/expr34801/expr34801.html and the following
      test fail under Linux and Windows OS due to the same reason.
      Minus '-' is printed before zero value when float zero is transformed to string.

      JDK version:
      java version "1.3.1beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1beta-b08)
      Java HotSpot(TM) Client VM (build 1.3.1beta-b08, mixed mode)

      ------------------------test.java----------------------------------------------
      public class test {
              public static void main(String args[]) {
                      float zerof = + 0.0f;
                      double zerod = + 0.0d;
                      String s=Float.toString(0.0f - zerof);
                      if (s.startsWith("-"))
                          System.out.println("Failed: "+s);
                      else
                          System.out.println("Passed: "+s);
              }
      }
      -------------------------output-------------------------------------------------
      [kotl@linux-14 ]$ java -server -Xcomp test
      Failed: -0.0
      [kotl@linux-14 ]$ java -client -Xcomp test
      Passed: 0.0
      [kotl@linux-14 ]$ java -client test
      Passed: 0.0
      [kotl@linux-14 ]$ java -server test
      Passed: 0.0

            cclicksunw Clifford Click (Inactive)
            irasunw Ira Ira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: