Skip to content

Commit

Permalink
Merge pull request #546 from jaikiran/UNDERTOW-1016
Browse files Browse the repository at this point in the history
[master branch] UNDERTOW-1016 Fix potential NPE while dealing with unresolved InetSocketAddress
  • Loading branch information
stuartwdouglas committed Aug 22, 2017
2 parents 52a3c8d + d95237e commit a1845f7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ public static WebBuilder webBuilder() {

public MCMPConfig(Builder builder) {
this.managementSocketAddress = new InetSocketAddress(builder.managementHost, builder.managementPort);
if (managementSocketAddress.getAddress().isAnyLocalAddress()) {
throw UndertowLogger.PROXY_REQUEST_LOGGER.cannotUseWildcardAddressAsModClusterManagementHost(builder.managementHost);
}
if (managementSocketAddress.isUnresolved()) {
throw UndertowLogger.PROXY_REQUEST_LOGGER.unableToResolveModClusterManagementHost(builder.managementHost);
}
if (managementSocketAddress.getAddress().isAnyLocalAddress()) {
throw UndertowLogger.PROXY_REQUEST_LOGGER.cannotUseWildcardAddressAsModClusterManagementHost(builder.managementHost);
}
if (builder.advertiseBuilder != null) {
this.advertiseConfig = new AdvertiseConfig(builder.advertiseBuilder, this);
} else {
Expand Down

0 comments on commit a1845f7

Please sign in to comment.