Version 0.1.2 bump - fixed problem where IPv4 Addresses weren't converted correctly.

This commit is contained in:
Christian Basler 2015-06-20 08:09:51 +02:00
parent 455c0b9c2c
commit 027efe43df
2 changed files with 3 additions and 1 deletions

View File

@ -5,7 +5,7 @@ allprojects {
sourceCompatibility = 1.7 sourceCompatibility = 1.7
group = 'ch.dissem.jabit' group = 'ch.dissem.jabit'
version = '0.1.2-SNAPSHOT' version = '0.1.2'
repositories { repositories {
mavenCentral() mavenCentral()

View File

@ -157,6 +157,8 @@ public class NetworkAddress implements Streamable {
this.ipv6 = addr; this.ipv6 = addr;
} else if (addr.length == 4) { } else if (addr.length == 4) {
this.ipv6 = new byte[16]; this.ipv6 = new byte[16];
this.ipv6[10] = (byte) 0xff;
this.ipv6[11] = (byte) 0xff;
System.arraycopy(addr, 0, this.ipv6, 12, 4); System.arraycopy(addr, 0, this.ipv6, 12, 4);
} else { } else {
throw new IllegalArgumentException("Weird address " + inetAddress); throw new IllegalArgumentException("Weird address " + inetAddress);