You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by yu...@apache.org on 2023/08/21 00:29:08 UTC

[thrift] 06/06: THRIFT-5653: Fix Java UUID typeid

This is an automated email from the ASF dual-hosted git repository.

yuxuan pushed a commit to branch 0.19.0
in repository https://gitbox.apache.org/repos/asf/thrift.git

commit 291b560c36f7f1a15ab87b19ceef23b0d92e11c6
Author: Yuxuan 'fishy' Wang <yu...@reddit.com>
AuthorDate: Thu Aug 10 08:54:54 2023 -0700

    THRIFT-5653: Fix Java UUID typeid
    
    It should be 16 not 17 according to the spec.
    
    Currently ENUM holds 16, it's not in TBinaryProtocol spec and seems to
    be a Java implementation detail somehow got mixed inside TType, move
    that to -1 for now. Someone more familiar with Java can probably remove
    it from TType completely in the future.
    
    client: java
---
 lib/java/src/main/java/org/apache/thrift/protocol/TType.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/lib/java/src/main/java/org/apache/thrift/protocol/TType.java b/lib/java/src/main/java/org/apache/thrift/protocol/TType.java
index 5a64e4278..fbcdac33e 100644
--- a/lib/java/src/main/java/org/apache/thrift/protocol/TType.java
+++ b/lib/java/src/main/java/org/apache/thrift/protocol/TType.java
@@ -34,6 +34,8 @@ public final class TType {
   public static final byte MAP = 13;
   public static final byte SET = 14;
   public static final byte LIST = 15;
-  public static final byte ENUM = 16;
-  public static final byte UUID = 17;
+  public static final byte UUID = 16;
+
+  /** This is not part of the TBinaryProtocol spec but Java specific implementation detail */
+  public static final byte ENUM = -1;
 }