harmony-commits mailing list archives

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

URL: http://svn.apache.org/viewvc?rev=796979&view=rev
Log:
Fix encoding bug in org.apache.harmony.security.tests.asn1.der.DerUTCTimeEDTest.testUTCEncoder
test method for z/OS

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

Modified: harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerUTCTimeEDTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerUTCTimeEDTest.java?rev=796979&r1=796978&r2=796979&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerUTCTimeEDTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/security/src/test/impl/java/org/apache/harmony/security/tests/asn1/der/DerUTCTimeEDTest.java
Thu Jul 23 08:42:31 2009
@@ -56,7 +56,7 @@
         Date myDate = getGmtDate(1101980374187L);
         byte[] encoded =
             new DerOutputStream(uTime, myDate).encoded;
-        String rep = new String(encoded, 2, encoded[1] & 0xff);
+        String rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("no fraction", "041202093934Z", rep);
 
         // midnight
@@ -66,7 +66,7 @@
         myDate = sdf.parse("06.06.2004 00:00");
         encoded =
             new DerOutputStream(uTime, myDate).encoded;
-        rep = new String(encoded, 2, encoded[1] & 0xff);
+        rep = new String(encoded, 2, encoded[1] & 0xff, "UTF-8");
         assertEquals("midnight", "040606000000Z", rep);
     }
 



Mime
View raw message