Apache9 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_r332390100
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/replication/regionserver/RegionReplicaReplicationEndpoint.java
##########
@@ -289,7 +289,7 @@ public boolean replicate(ReplicateContext
replicateContext) {
}
continue outer;
}
- if (!requiresReplication(tableDesc, entry)) {
+ if (!requiresReplication(tableDesc.orElse(null), entry)) {
Review comment:
OK, again, here we unwrap the optional by checking whether it is null and
inside the method we checl it again...
Where does this Optional come from? If we could not change the root, let's
keep it as is?
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services