Skip to content
Snippets Groups Projects
Commit fe58fb4c authored by akwizgran's avatar akwizgran
Browse files

Fixed more unit tests.

parent e7f106a7
No related branches found
No related tags found
No related merge requests found
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment