Skip to content

Commit

Permalink
THRIFT-5653: Fix Java UUID typeid
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fishy committed Aug 21, 2023
1 parent ee1a7ea commit 291b560
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/java/src/main/java/org/apache/thrift/protocol/TType.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

0 comments on commit 291b560

Please sign in to comment.