stoty commented on code in PR #6499:
URL: https://github.com/apache/hbase/pull/6499#discussion_r1909197179
##########
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:
Since this code is not performance critial, we could just check for the type
and avoid the suppression:
```
if(value instanceOf Boolean) {
return Boolean.TRUE.equals(value);
} else {
return false; // or true, does not matter
}
```
##########
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);
+ }
+
+ @Override
Review Comment:
This is confusing, and I don't think this is necessary.
hashCode() is never called for for this object according to the docs.
--
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]