Skip to content

Commit bea0492

Browse files
committed
changed inet4 and inet6 to common inet
1 parent e2db5c5 commit bea0492

File tree

1 file changed

+3
-10
lines changed

1 file changed

+3
-10
lines changed

vertx-pg-client/src/main/java/io/vertx/pgclient/impl/codec/DataTypeCodec.java

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,18 +1732,11 @@ private static Cidr binaryDecodeCidr(int index, int len, ByteBuf buff){
17321732

17331733
switch (family){
17341734
case 2:
1735-
// IPV4
1736-
try {
1737-
address = Inet4Address.getByAddress(data);
1738-
}catch (UnknownHostException e){
1739-
throw new DecoderException(e);
1740-
}
1741-
break;
17421735
case 3:
1743-
// IPV6
1736+
// IPV4 and IPV6
17441737
try {
1745-
address = Inet6Address.getByAddress(data);
1746-
} catch (UnknownHostException e) {
1738+
address = InetAddress.getByAddress(data);
1739+
}catch (UnknownHostException e){
17471740
throw new DecoderException(e);
17481741
}
17491742
break;

0 commit comments

Comments
 (0)