java.sql.Timestamp.setNanos() works wrong with negative values

XMLWordPrintable

    • 1.1
    • sparc
    • solaris_2.5
    • Not verified

      This method should throw IllegalArgumentException but it doesn't

      === Here is the test demonstrating ther bug ===
      class java_sql_Timestamp3 {
        public static void main (String args[]) {
          java.sql.Timestamp t=new java.sql.Timestamp(96,11,13,14,15,25,745634000);
          t.setNanos(-10000);
          System.out.println(t.getNanos());
        }
      }

      === Here is the output of the test ===
      -10000

            Assignee:
            Mark Hapner (Inactive)
            Reporter:
            Mikhail Gorshenev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: