rpuch commented on code in PR #814:
URL: https://github.com/apache/ignite-3/pull/814#discussion_r877780991
##########
modules/page-memory/src/main/java/org/apache/ignite/internal/pagememory/io/AbstractDataPageIo.java:
##########
@@ -611,24 +626,73 @@ protected int getDataOffset(long pageAddr, int itemId,
int pageSize) {
assert directCnt > 0 : "itemId=" + itemId + ", directCnt=" + directCnt
+ ", page=" + printPageLayout(pageAddr, pageSize);
+ final int directItemId;
Review Comment:
It makes sense to declare this variable `final` because the code that
follows it is pretty long (longer than 3-5 lines). It makes the code more
easily comprehensible (the reader easily sees that the variable never gets
reassigned). This allows to understand the code more quickly (and spare time).
In the original code, for example, `itemId` was reassigned, and you had to
read really carefully (=slowly) to spot it.
--
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]