DonalEvans commented on a change in pull request #5473:
URL: https://github.com/apache/geode/pull/5473#discussion_r476877485
##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/Oplog.java
##########
@@ -3583,7 +3597,7 @@ private void basicCreate(DiskRegion dr, DiskEntry entry,
ValueWrapper value, byt
logger.trace(LogMarker.PERSIST_WRITES_VERBOSE,
"basicCreate: id=<{}> key=<{}> valueOffset={} userBits={}
valueLen={} valueBytes={} drId={} versionTag={} oplog#{}",
abs(id.getKeyId()), entry.getKey(), startPosForSynchOp,
userBits,
- (value != null ? value.getLength() : 0),
value.getBytesAsString(), dr.getId(), tag,
Review comment:
In a sense, yes. The warning was being generated because checking if
`value` was null here implied that it could be null before/after this check,
and that calling methods on it could produce an NPE. However, when examining
the code path, `value` should never be null at this point, so the check was
redundant.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]