Skip to content

Commit 0f1a22b

Browse files
committed
Avoid unused assignment
1 parent ef471ac commit 0f1a22b

File tree

1 file changed

+3
-2
lines changed
  • core/core-service-discovery/src/main/java/ai/wanaku/core/service/discovery/util

1 file changed

+3
-2
lines changed

core/core-service-discovery/src/main/java/ai/wanaku/core/service/discovery/util/DiscoveryUtil.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import java.net.InetAddress;
44
import java.net.UnknownHostException;
55

6+
import ai.wanaku.api.exceptions.WanakuException;
7+
68
/**
79
* Utilities to help with target discovery
810
*/
@@ -15,9 +17,8 @@ private DiscoveryUtil() {}
1517
* @return the address as a string
1618
*/
1719
public static String resolveRegistrationAddress() {
18-
InetAddress address = null;
1920
try {
20-
address = InetAddress.getLocalHost();
21+
InetAddress address = InetAddress.getLocalHost();
2122
return address.getHostAddress();
2223
} catch (UnknownHostException e) {
2324
throw new RuntimeException(e);

0 commit comments

Comments
 (0)