Merge branch 'master' into release/2.0.3

This commit is contained in:
Christian Basler 2016-10-22 09:37:56 +02:00
commit 1bc82cdd7d

View File

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