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