directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r265768 - /directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/messages/NtpTimeStamp.java
Date Thu, 01 Sep 2005 19:19:24 GMT
Author: elecharny
Date: Thu Sep  1 12:19:18 2005
New Revision: 265768

URL: http://svn.apache.org/viewcvs?rev=265768&view=rev
Log:
Synchronized SimpleDateFormat

Modified:
    directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/messages/NtpTimeStamp.java

Modified: directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/messages/NtpTimeStamp.java
URL: http://svn.apache.org/viewcvs/directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/messages/NtpTimeStamp.java?rev=265768&r1=265767&r2=265768&view=diff
==============================================================================
--- directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/messages/NtpTimeStamp.java
(original)
+++ directory/protocol-providers/ntp/trunk/src/java/org/apache/ntp/messages/NtpTimeStamp.java
Thu Sep  1 12:19:18 2005
@@ -99,7 +99,10 @@
         long msSinceStartOfNtpEpoch = seconds * 1000 + ( fraction * 1000 ) / 0x100000000L;
         Date date = new Date( msSinceStartOfNtpEpoch + NTP_EPOCH_DIFFERENCE );
         
-		return "org.apache.ntp.message.NtpTimeStamp[ date = " + dateFormat.format( date ) + " ]";
+        synchronized (dateFormat)
+        {
+        	return "org.apache.ntp.message.NtpTimeStamp[ date = " + dateFormat.format( date
) + " ]";
+        }
 	}
 	
 	public boolean equals( Object o )



Mime
View raw message