Skip to content

Commit

Permalink
Merge pull request #123 from dmlloyd/fix-122
Browse files Browse the repository at this point in the history
Avoid NPE when parsing CidrAddress
  • Loading branch information
dmlloyd authored Sep 25, 2024
2 parents 2068971 + 6846115 commit 90435f0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/org/wildfly/common/net/Inet.java
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,8 @@ public static InetAddress parseInetAddressOrFail(String address, String hostName
*/
@Deprecated(forRemoval = true)
public static CidrAddress parseCidrAddress(String address) {
return new CidrAddress(io.smallrye.common.net.Inet.parseCidrAddress(address));
io.smallrye.common.net.CidrAddress cidrAddress = io.smallrye.common.net.Inet.parseCidrAddress(address);
return cidrAddress == null ? null : new CidrAddress(cidrAddress);
}

/**
Expand Down

0 comments on commit 90435f0

Please sign in to comment.