ctubbsii commented on code in PR #3788:
URL: https://github.com/apache/accumulo/pull/3788#discussion_r1340738031


##########
core/src/main/java/org/apache/accumulo/core/lock/ServiceLockData.java:
##########
@@ -164,30 +165,22 @@ public ServiceLockData(UUID uuid, String address, 
ThriftService service) {
 
   public String getAddressString(ThriftService service) {
     ServiceDescriptor sd = services.get(service);
-    if (sd == null) {
-      return null;
-    }
-    return sd.getAddress();
+    return sd == null ? null : sd.getAddress();
   }
 
   public HostAndPort getAddress(ThriftService service) {
-    return AddressUtil.parseAddress(getAddressString(service), false);
+    String s = getAddressString(service);
+    return s == null ? null : AddressUtil.parseAddress(s, false);

Review Comment:
   This is the main change that fixes things in this PR. The other changes in 
this class were just taking the opportunity to make the other methods that do 
the same thing a bit more concise and consistent with one another.



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