chandrasekhar-188k commented on code in PR #6499:
URL: https://github.com/apache/hbase/pull/6499#discussion_r1910443729


##########
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/model/ScannerModel.java:
##########
@@ -143,6 +145,21 @@ public void setIncludeStartRow(boolean includeStartRow) {
     this.includeStartRow = includeStartRow;
   }
 
+  @edu.umd.cs.findbugs.annotations.SuppressWarnings(
+      value = "EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS",
+      justification = "The supplied value from the JSON Value Filter is of 
Type Boolean")
+  private static class IncludeStartRowFilter {
+    @Override
+    public boolean equals(Object value) {
+      return Boolean.TRUE.equals(value);

Review Comment:
   according to the documents EQ_CHECK_FOR_OPERAND_NOT_COMPATIBLE_WITH_THIS 
checks if we are doing an instanceof check on any thing other than the current 
class. in this case it is IncludeStartRowFilter. 
   the equals() implementation of Boolean class as below.
   
![image](https://github.com/user-attachments/assets/ec9d93af-2f9f-4077-a180-b7051b879a12)
   Since it is trying to check instanceof Boolean which is not in the Hierachy 
of IncludeStartRowFilter find bugs is reporting it as voilation. 
   I had tried your suggestion before, but it still fails due to above reason. 



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