sarvekshayr commented on code in PR #8842:
URL: https://github.com/apache/ozone/pull/8842#discussion_r2234844082
##########
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/security/OzoneTokenIdentifier.java:
##########
@@ -225,7 +228,11 @@ public static OzoneTokenIdentifier readProtoBuf(DataInput
in)
if (token.hasSecretKeyId()) {
identifier.setSecretKeyId(token.getSecretKeyId());
}
- identifier.setOmServiceId(token.getOmServiceId());
Review Comment:
Due to the missing if condition, the `omServiceId` field was empty after
serialization + deserialization.
There’s no need to explicitly set it to null in readFields() and
readProtoBuf(), as it will be null by default if not set.
If we were to explicitly assign null, we’d need to do the same for all other
fields for consistency, which is unnecessary.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]