fishy commented on code in PR #2843:
URL: https://github.com/apache/thrift/pull/2843#discussion_r1291692445
##########
lib/java/src/main/java/org/apache/thrift/protocol/TType.java:
##########
@@ -34,6 +34,11 @@ 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;
Review Comment:
UUID is something we added to the spec in 0.17.0:
https://github.com/apache/thrift/commit/4959a92385e2a6d7a4b8419784f85e5762c714cf.
Java implementation used the wrong number not in the spec.
The reason to add a new type was discussed in
https://issues.apache.org/jira/browse/THRIFT-5587.
ENUM is not a TType in the spec, it's only in Java's implementation of TType
as far as I'm aware of. I also don't believe it's used in the wire protocol
because if so the TBinaryProtocol cross test between java and other languages
would break on enum fields, which does not happen today.
--
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]