sjvanrossum commented on code in PR #34764:
URL: https://github.com/apache/beam/pull/34764#discussion_r2065980914
##########
sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/windowing/PaneInfo.java:
##########
@@ -360,7 +387,8 @@ public PaneInfo decode(final InputStream inStream) throws
CoderException, IOExce
byte keyAndTag = (byte) inStream.read();
PaneInfo base = Preconditions.checkNotNull(BYTE_TO_PANE_INFO.get((byte)
(keyAndTag & 0x0F)));
long index, onTimeIndex;
- switch (Encoding.fromTag(keyAndTag)) {
+ boolean elementMetadata = (keyAndTag & 0x80) > 0;
+ switch (Encoding.fromTag((byte) (keyAndTag & 0x7F))) {
Review Comment:
Feel free to ignore my codegolfing...
```suggestion
boolean elementMetadata = keyAndTag < (keyAndTag &= 0x7f);
switch (Encoding.fromTag(keyAndTag) {
```
--
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]