harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zhouke...@apache.org
Subject svn commit: r796977 - /harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java
Date Thu, 23 Jul 2009 08:34:02 GMT
Author: zhoukevin
Date: Thu Jul 23 08:34:01 2009
New Revision: 796977

URL: http://svn.apache.org/viewvc?rev=796977&view=rev
Log:
Fix the test failure of org.apache.harmony.security.tests.asn1.der.DerGeneralizedTimeEDTest.testGeneralizedEncoder
on z/OS.

Modified:
    harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java

Modified: harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java?rev=796977&r1=796976&r2=796977&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerGeneralizedTimeEDTest.java
Thu Jul 23 08:34:01 2009
@@ -54,28 +54,28 @@
         Date myDate = getGmtDate(1101980374187L);
         byte[] encoded =
             new DerOutputStream(gTime, myDate).encoded;
-        String rep = new String(encoded, 2, encoded[1] & 0xff);
+        String rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("full", "20041202093934.187Z", rep);
 
         // 2 digit fractional seconds (last 0 must be trimmed out)
         myDate = getGmtDate(1101980374180L);
         encoded =
             new DerOutputStream(gTime, myDate).encoded;
-        rep = new String(encoded, 2, encoded[1] & 0xff);
+        rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("2 fraction", "20041202093934.18Z", rep);
 
         // 1 digit fractional seconds (last 2 0s must be trimmed out)
         myDate = getGmtDate(1101980374100L);
         encoded =
             new DerOutputStream(gTime, myDate).encoded;
-        rep = new String(encoded, 2, encoded[1] & 0xff);
+        rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("1 fraction", "20041202093934.1Z", rep);
 
         // no fractional seconds (last 3 0s and "." must be trimmed out)
         myDate = getGmtDate(1101980374000L);
         encoded =
             new DerOutputStream(gTime, myDate).encoded;
-        rep = new String(encoded, 2, encoded[1] & 0xff);
+        rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("no fraction", "20041202093934Z", rep);
 
         // midnight
@@ -85,7 +85,7 @@
         myDate = sdf.parse("06.06.2004 00:00");
         encoded =
             new DerOutputStream(gTime, myDate).encoded;
-        rep = new String(encoded, 2, encoded[1] & 0xff);
+        rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("midnight", "20040606000000Z", rep);
     }
 



Mime
View raw message