mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-17 05:09:53 +01:00
Fixed more unit tests.
This commit is contained in:
@@ -69,10 +69,7 @@ class BundleWriterImpl implements BundleWriter {
|
|||||||
// Write the data
|
// Write the data
|
||||||
writer.writeListStart();
|
writer.writeListStart();
|
||||||
// Bypass the writer and write each raw message directly
|
// Bypass the writer and write each raw message directly
|
||||||
for(Raw message : messages) {
|
for(Raw message : messages) out.write(message.getBytes());
|
||||||
writer.writeUserDefinedTag(Tags.MESSAGE);
|
|
||||||
out.write(message.getBytes());
|
|
||||||
}
|
|
||||||
writer.writeListEnd();
|
writer.writeListEnd();
|
||||||
// Stop digesting
|
// Stop digesting
|
||||||
out.on(false);
|
out.on(false);
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import net.sf.briar.api.protocol.GroupId;
|
|||||||
import net.sf.briar.api.protocol.Message;
|
import net.sf.briar.api.protocol.Message;
|
||||||
import net.sf.briar.api.protocol.MessageEncoder;
|
import net.sf.briar.api.protocol.MessageEncoder;
|
||||||
import net.sf.briar.api.protocol.MessageId;
|
import net.sf.briar.api.protocol.MessageId;
|
||||||
|
import net.sf.briar.api.protocol.Tags;
|
||||||
import net.sf.briar.api.serial.Writer;
|
import net.sf.briar.api.serial.Writer;
|
||||||
import net.sf.briar.api.serial.WriterFactory;
|
import net.sf.briar.api.serial.WriterFactory;
|
||||||
|
|
||||||
@@ -35,6 +36,7 @@ class MessageEncoderImpl implements MessageEncoder {
|
|||||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||||
Writer w = writerFactory.createWriter(out);
|
Writer w = writerFactory.createWriter(out);
|
||||||
// Write the message
|
// Write the message
|
||||||
|
w.writeUserDefinedTag(Tags.MESSAGE);
|
||||||
parent.writeTo(w);
|
parent.writeTo(w);
|
||||||
group.writeTo(w);
|
group.writeTo(w);
|
||||||
w.writeInt64(timestamp);
|
w.writeInt64(timestamp);
|
||||||
|
|||||||
Reference in New Issue
Block a user