ctubbsii commented on code in PR #2843:
URL: https://github.com/apache/thrift/pull/2843#discussion_r1293831694


##########
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:
   I'm not that familiar with this part of the code, but from my perspective, 
it looks like a Thrift Enum type serialized by the previous version of Thrift 
(like 0.18.1) would get incorrectly deserialized as a UUID by the newer version 
by the newer version (0.19.0) instead of the intended enum. I previously 
mentioned wire compatibility, because the situation I was thinking was if the 
client and server had different libthrift.jar library versions.
   
   It is highly likely I just don't understand this code. At a high level, 
where is this constant being serialized? Is it only ever in memory within a 
single process, or is it ever persisted or show up in any user objects that 
they might serialize?



-- 
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