dlg99 commented on code in PR #15757: URL: https://github.com/apache/pulsar/pull/15757#discussion_r880926599
########## managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ManagedCursorImpl.java: ########## @@ -361,6 +369,18 @@ public void operationComplete(ManagedCursorInfo info, Stat stat) { cursorLedgerStat = stat; lastActive = info.getLastActive() != 0 ? info.getLastActive() : lastActive; + + Map<String, String> recoveredCursorProperties = Collections.emptyMap(); + if (info.getCursorPropertiesCount() > 0) { + // Recover properties map + recoveredCursorProperties = Maps.newHashMap(); Review Comment: Exactly my point ;) Can't guess that without looking at the library code or docs. "ImmutableMap.of()" can express this in a more visible way. -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org