opwvhk commented on code in PR #2652:
URL: https://github.com/apache/avro/pull/2652#discussion_r1442745011


##########
lang/java/avro/src/main/java/org/apache/avro/Conversions.java:
##########
@@ -44,6 +44,17 @@
 public class Conversions {
 
   public static class UUIDConversion extends Conversion<UUID> {
+
+    private final boolean isBigEndian;
+
+    public UUIDConversion() {
+      this(ByteOrder.nativeOrder() == ByteOrder.BIG_ENDIAN);

Review Comment:
   ~Given that UUIDs are 128 bit labels (source with extra references: 
https://en.wikipedia.org/wiki/Universally_unique_identifier#Binary_wire_format),
 I think using a fixed byte order of BigEndian is the best choice.~
   
   As per the [RFC 4122 section 
4.1.2](https://www.ietf.org/rfc/rfc4122.html#section-4.1.2), and because we 
haven't specified anything to the contrary, the byte layout must be in network 
order (BigEndian).



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to