Merge tag '2.0.3' into develop

Version 2.0.3
This commit is contained in:
Christian Basler 2016-10-24 08:13:18 +02:00
commit e1173d0619

View File

@ -198,6 +198,7 @@ public class Plaintext implements Streamable {
} }
} }
} }
public void write(ByteBuffer buffer, boolean includeSignature) { public void write(ByteBuffer buffer, boolean includeSignature) {
Encode.varInt(from.getVersion(), buffer); Encode.varInt(from.getVersion(), buffer);
Encode.varInt(from.getStream(), buffer); Encode.varInt(from.getStream(), buffer);
@ -279,6 +280,7 @@ public class Plaintext implements Streamable {
} }
public void updateNextTry() { public void updateNextTry() {
if (to != null) {
if (nextTry == null) { if (nextTry == null) {
if (sent != null && to.has(Feature.DOES_ACK)) { if (sent != null && to.has(Feature.DOES_ACK)) {
nextTry = UnixTime.now(+ttl); nextTry = UnixTime.now(+ttl);
@ -289,6 +291,7 @@ public class Plaintext implements Streamable {
retries++; retries++;
} }
} }
}
public String getSubject() { public String getSubject() {
Scanner s = new Scanner(new ByteArrayInputStream(message), "UTF-8"); Scanner s = new Scanner(new ByteArrayInputStream(message), "UTF-8");
@ -323,7 +326,7 @@ public class Plaintext implements Streamable {
Objects.equals(from, plaintext.from) && Objects.equals(from, plaintext.from) &&
Arrays.equals(message, plaintext.message) && Arrays.equals(message, plaintext.message) &&
Objects.equals(getAckMessage(), plaintext.getAckMessage()) && Objects.equals(getAckMessage(), plaintext.getAckMessage()) &&
Arrays.equals(to.getRipe(), plaintext.to.getRipe()) && Arrays.equals(to == null ? null : to.getRipe(), plaintext.to == null ? null : plaintext.to.getRipe()) &&
Arrays.equals(signature, plaintext.signature) && Arrays.equals(signature, plaintext.signature) &&
Objects.equals(status, plaintext.status) && Objects.equals(status, plaintext.status) &&
Objects.equals(sent, plaintext.sent) && Objects.equals(sent, plaintext.sent) &&