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_r332413719
##########
File path:
hbase-client/src/main/java/org/apache/hadoop/hbase/client/AsyncConnectionImpl.java
##########
@@ -281,7 +281,7 @@ void clearMasterStubCache(MasterService.Interface stub) {
masterStub.compareAndSet(stub, null);
}
- Optional<ServerStatisticTracker> getStatisticsTracker() {
+ ServerStatisticTracker getStatisticsTracker() {
Review comment:
I think we should align the interface... It is a bit confusing that we
return Optional for some methods, and then some other methods which do not
return an Optional but could still return null...
----------------------------------------------------------------
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