virajjasani commented on a change in pull request #673: HBASE-23093 : Avoid 
Optional Anti-Pattern where possible
URL: https://github.com/apache/hbase/pull/673#discussion_r332403445
 
 

 ##########
 File path: 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/StoreScanner.java
 ##########
 @@ -351,11 +350,11 @@ public StoreScanner(ScanInfo scanInfo, ScanType scanType,
 
   // Used to instantiate a scanner for compaction in test
   @VisibleForTesting
-  StoreScanner(ScanInfo scanInfo, OptionalInt maxVersions, ScanType scanType,
+  StoreScanner(ScanInfo scanInfo, Integer maxVersions, ScanType scanType,
 
 Review comment:
   True both are wrapping but OptionalInt is again wrapping Integer also.
   Here we call this:
   
https://github.com/apache/hbase/pull/673/files#diff-ff286d61ea5468d0f8978181e4f3a896R946
   
https://github.com/apache/hbase/pull/673/files#diff-ff286d61ea5468d0f8978181e4f3a896R974
   
   At least we can directly pass int value 2 or null rather than 
OptionalInt.of(2) and Optional.empty()

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to