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

java.util.prefs Preferences test passes with warning message on linux6.2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • core-libs
    • None
    • beta
    • x86
    • linux
    • Verified

      java.util.prefs Preferences test passes with warning message on linux6.2
      warning message:

      WARNING: Chmod failed on /tmp/.java/prefs Unix error code 1

      jdk1.4 build55

      Test Program:
      ------------------------------------------------------------------
       
      import java.util.prefs.*;
      import java.util.*;
       
       
      public class PutFloat {
            public static void main(String[] args) throws Exception {
            try {
                 Preferences userRoot = Preferences.userRoot();
                 Preferences N1 = userRoot.node("N1");
                 N1.clear();
                 N1.putFloat("k1",Float.MIN_VALUE);
                 float valueExpected = Float.MIN_VALUE;
                 float valueGot = N1.getFloat("k1",1.0f);
                 if (valueGot != valueExpected) {
                    throw new Exception("valueGot != valueExpected not ok in PutFloatTest01()");
                 }
                 System.out.println("PutFloatTest01() Pass");
             } catch(Exception e) {
                 System.out.println("Exception thrown = " + e);
                 System.out.println("PutFloatTest01() Fail");
                 e.printStackTrace();
             }
         }
      }
      --------------------------------------result on linux6.2-----------------
      [nitin_linux@pc-ellington tempb54]$ javac PutFloat.java
      [nitin_linux@pc-ellington tempb54]$ java PutFloat
      Mar 12, 2001 10:21:10 AM java.util.prefs.FileSystemPreferences$6 run
      WARNING: Chmod failed on /tmp/.java/prefs Unix error code 1
      PutFloatTest01() Pass


            kkladkosunw Konstantin Kladko (Inactive)
            spandeorcl Shantaram Pande (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: