You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/02/21 09:11:53 UTC

[GitHub] tillrohrmann commented on a change in pull request #7783: [FLINK-11699][JobManager] Use equals for String compare in AbstractDispatcherResourceManagerComponentFactory

tillrohrmann commented on a change in pull request #7783: [FLINK-11699][JobManager] Use equals for String compare in AbstractDispatcherResourceManagerComponentFactory
URL: https://github.com/apache/flink/pull/7783#discussion_r258836413
 
 

 ##########
 File path: flink-runtime/src/main/java/org/apache/flink/runtime/entrypoint/component/AbstractDispatcherResourceManagerComponentFactory.java
 ##########
 @@ -260,7 +260,7 @@ public AbstractDispatcherResourceManagerComponentFactory(
 
 	protected String getHostname(RpcService rpcService) {
 		final String rpcServiceAddress = rpcService.getAddress();
-		return rpcServiceAddress == "" ? "localhost" : rpcServiceAddress;
+		return "".equals(rpcServiceAddress) ? "localhost" : rpcServiceAddress;
 
 Review comment:
   Good catch. I think it would be even better to use `rpcServiceAddress.isEmpty()`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services