directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r265734 - in /directory/asn1/branches/asn1-new-ber/der/src/java/org/apache/asn1/der: DERGeneralizedTime.java DERUTCTime.java
Date Thu, 01 Sep 2005 14:01:50 GMT
Author: elecharny
Date: Thu Sep  1 07:01:41 2005
New Revision: 265734

URL: http://svn.apache.org/viewcvs?rev=265734&view=rev
Log:
Synchronized the SImpleDateFormat

Modified:
    directory/asn1/branches/asn1-new-ber/der/src/java/org/apache/asn1/der/DERGeneralizedTime.java
    directory/asn1/branches/asn1-new-ber/der/src/java/org/apache/asn1/der/DERUTCTime.java

Modified: directory/asn1/branches/asn1-new-ber/der/src/java/org/apache/asn1/der/DERGeneralizedTime.java
URL: http://svn.apache.org/viewcvs/directory/asn1/branches/asn1-new-ber/der/src/java/org/apache/asn1/der/DERGeneralizedTime.java?rev=265734&r1=265733&r2=265734&view=diff
==============================================================================
--- directory/asn1/branches/asn1-new-ber/der/src/java/org/apache/asn1/der/DERGeneralizedTime.java
(original)
+++ directory/asn1/branches/asn1-new-ber/der/src/java/org/apache/asn1/der/DERGeneralizedTime.java
Thu Sep  1 07:01:41 2005
@@ -48,7 +48,12 @@
      */
     public static DERGeneralizedTime valueOf( Date date )
     {
-        String dateString = dateFormat.format( date );
+        String dateString = null;
+
+	synchronized( dateFormat )
+	{
+            dateString = dateFormat.format( date );
+	}
         
         byte[] bytes = stringToByteArray( dateString );
 
@@ -64,8 +69,11 @@
     	throws ParseException
     {
         String string = byteArrayToString( value );
-        
-        return dateFormat.parse( string );
+       
+        synchronized( dateFormat )
+	{	
+            return dateFormat.parse( string );
+	}
     }
 }
 

Modified: directory/asn1/branches/asn1-new-ber/der/src/java/org/apache/asn1/der/DERUTCTime.java
URL: http://svn.apache.org/viewcvs/directory/asn1/branches/asn1-new-ber/der/src/java/org/apache/asn1/der/DERUTCTime.java?rev=265734&r1=265733&r2=265734&view=diff
==============================================================================
--- directory/asn1/branches/asn1-new-ber/der/src/java/org/apache/asn1/der/DERUTCTime.java
(original)
+++ directory/asn1/branches/asn1-new-ber/der/src/java/org/apache/asn1/der/DERUTCTime.java
Thu Sep  1 07:01:41 2005
@@ -48,7 +48,12 @@
      */
     public static DERUTCTime valueOf( Date date )
     {
-        String dateString = dateFormat.format( date );
+        String dateString = null;
+
+	synchronized (dateFormat)
+	{
+            dateString = dateFormat.format( date );
+	}
         
         byte[] bytes = stringToByteArray( dateString );
 
@@ -64,8 +69,11 @@
     	throws ParseException
     {
         String string = byteArrayToString( value );
-        
-        return dateFormat.parse( string );
+       
+        synchronized (dateFormat)
+	{	
+            return dateFormat.parse( string );
+	}
     }
 }
 



Mime
View raw message