keith-turner commented on code in PR #3063:
URL: https://github.com/apache/accumulo/pull/3063#discussion_r1012060005


##########
core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/CachedBlockQueue.java:
##########
@@ -73,7 +73,7 @@ public void add(CachedBlock cb) {
       heapSize += cb.heapSize();
     } else {
       CachedBlock head = queue.peek();
-      if (cb.compareTo(head) > 0) {
+      if (head != null && cb.compareTo(head) > 0) {

Review Comment:
   > Modified in 
https://github.com/apache/accumulo/commit/d0b5f0d3cba000bc4a05871c413c9023d09892e9
 to use Objects.requireNonUnull
   
   I wonder if that will resolve the checkstyle issue.  Can you remove new 
check in the if statement?



##########
core/src/main/java/org/apache/accumulo/core/file/blockfile/cache/lru/CachedBlockQueue.java:
##########
@@ -73,7 +73,7 @@ public void add(CachedBlock cb) {
       heapSize += cb.heapSize();
     } else {
       CachedBlock head = queue.peek();
-      if (cb.compareTo(head) > 0) {
+      if (head != null && cb.compareTo(head) > 0) {

Review Comment:
   > Modified in 
https://github.com/apache/accumulo/commit/d0b5f0d3cba000bc4a05871c413c9023d09892e9
 to use Objects.requireNonUnull
   
   I wonder if that will resolve the checkstyle issue.  Can you remove null 
check in the if statement?



-- 
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]

Reply via email to