fishy commented on code in PR #2843:
URL: https://github.com/apache/thrift/pull/2843#discussion_r1293856822
##########
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:
from my reading of the code, this is really not used in the wire protocol at
all (so it's never serialized/deserialized). it's used (read) by
deserialization code to decide what to do, while all the "writing" only happen
on thrift compiler generated java code.
basically, compiler generated java type will use this value as some
metadata, and then when deserializing the library code will use the field from
the metadata to handle the actual logic. the metadata is only in a in-memory
object, not on the wire protocol.
--
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]