tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mindbri...@apache.org
Subject cvs commit: jakarta-tapestry/junit/src/org/apache/tapestry/junit TestBindings.java
Date Mon, 08 Dec 2003 17:44:50 GMT
mindbridge    2003/12/08 09:44:50

  Modified:    junit/src/org/apache/tapestry/junit TestBindings.java
  Log:
  Timestamp.getTime() behaves differently in JDK 1.3.x and JDK 1.4.x -- 
  it does not return nanos in 1.3, but returns them in 1.4. 
  The modification ensures that the unit tests work in both JDKs.
  
  Revision  Changes    Path
  1.8       +2 -2      jakarta-tapestry/junit/src/org/apache/tapestry/junit/TestBindings.java
  
  Index: TestBindings.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tapestry/junit/src/org/apache/tapestry/junit/TestBindings.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- TestBindings.java	8 Dec 2003 00:08:28 -0000	1.7
  +++ TestBindings.java	8 Dec 2003 17:44:50 -0000	1.8
  @@ -799,6 +799,6 @@
           // for Timestamp suggest using nanos/1000000 to find the actual millis.
           // Otherwise, just using assertEquals(date, page.getDateValue()) fails 
           // under JDK 1.3.
  -        assertEquals(date, new Date(page.getDateValue().getTime() + page.getDateValue().getNanos()
/ 1000000));
  +        assertEquals(date, new Date((page.getDateValue().getTime()/1000)*1000 + page.getDateValue().getNanos()
/ 1000000));
       }
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


Mime
View raw message