avro-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cutt...@apache.org
Subject svn commit: r1339374 - in /avro/trunk: CHANGES.txt lang/java/avro/src/main/java/org/apache/avro/file/DataFileWriter.java
Date Wed, 16 May 2012 21:24:17 GMT
Author: cutting
Date: Wed May 16 21:24:16 2012
New Revision: 1339374

URL: http://svn.apache.org/viewvc?rev=1339374&view=rev
Log:
AVRO-1062. Java: Remove use of java.rmi.server.UID so things work on Android.  Contributed
by Kevin Zhao.

Modified:
    avro/trunk/CHANGES.txt
    avro/trunk/lang/java/avro/src/main/java/org/apache/avro/file/DataFileWriter.java

Modified: avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/avro/trunk/CHANGES.txt?rev=1339374&r1=1339373&r2=1339374&view=diff
==============================================================================
--- avro/trunk/CHANGES.txt (original)
+++ avro/trunk/CHANGES.txt Wed May 16 21:24:16 2012
@@ -31,6 +31,9 @@ Avro 1.7.0 (unreleased)
 
     AVRO-1079. C++ Generator, improve include guard generation. (thiru)
 
+    AVRO-1062. Java: Remove use of java.rmi.server.UID so things work
+    on Android.  (Kevin Zhao via cutting)
+
   BUG FIXES
 
     AVRO-1045. Java: Fix a bug in GenericData#deepCopy() of ByteBuffer values.

Modified: avro/trunk/lang/java/avro/src/main/java/org/apache/avro/file/DataFileWriter.java
URL: http://svn.apache.org/viewvc/avro/trunk/lang/java/avro/src/main/java/org/apache/avro/file/DataFileWriter.java?rev=1339374&r1=1339373&r2=1339374&view=diff
==============================================================================
--- avro/trunk/lang/java/avro/src/main/java/org/apache/avro/file/DataFileWriter.java (original)
+++ avro/trunk/lang/java/avro/src/main/java/org/apache/avro/file/DataFileWriter.java Wed May
16 21:24:16 2012
@@ -31,11 +31,11 @@ import java.io.OutputStream;
 import java.io.RandomAccessFile;
 import java.io.UnsupportedEncodingException;
 import java.nio.ByteBuffer;
-import java.rmi.server.UID;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.UUID;
 
 import org.apache.avro.AvroRuntimeException;
 import org.apache.avro.Schema;
@@ -192,7 +192,7 @@ public class DataFileWriter<D> implement
     try {
       MessageDigest digester = MessageDigest.getInstance("MD5");
       long time = System.currentTimeMillis();
-      digester.update((new UID()+"@"+time).getBytes());
+      digester.update((UUID.randomUUID()+"@"+time).getBytes());
       return digester.digest();
     } catch (NoSuchAlgorithmException e) {
       throw new RuntimeException(e);



Mime
View raw message