From 3d049d5803a629b6ee0a1633d4a27eda7037ec0d Mon Sep 17 00:00:00 2001 From: David Renshaw Date: Wed, 28 May 2014 19:30:37 -0400 Subject: [PATCH] fix the build --- compiler/src/test/scala/org/capnproto/TestUtil.scala | 2 +- compiler/src/test/schema/test.capnp | 2 +- .../src/main/java/org/capnproto/PrimitiveList.java | 12 ++++++++++++ runtime/src/main/java/org/capnproto/StructList.java | 4 ++-- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/compiler/src/test/scala/org/capnproto/TestUtil.scala b/compiler/src/test/scala/org/capnproto/TestUtil.scala index 1bf9fc1..53c6482 100644 --- a/compiler/src/test/scala/org/capnproto/TestUtil.scala +++ b/compiler/src/test/scala/org/capnproto/TestUtil.scala @@ -6,7 +6,7 @@ import org.capnproto.test.Test._; object TestUtil { def initTestMessage(builder : TestAllTypes.Builder) { - builder.setVoidField(); + builder.setVoidField(org.capnproto.Void.VOID); builder.setBoolField(true); builder.setInt8Field(-123); builder.setInt16Field(-12345); diff --git a/compiler/src/test/schema/test.capnp b/compiler/src/test/schema/test.capnp index 78d615b..0035a8a 100644 --- a/compiler/src/test/schema/test.capnp +++ b/compiler/src/test/schema/test.capnp @@ -34,7 +34,7 @@ struct TestAllTypes { enumField @15 : TestEnum; interfaceField @16 : Void; # TODO -# voidList @17 : List(Void); +# voidList @17 : List(Void); # boolList @18 : List(Bool); # ... } diff --git a/runtime/src/main/java/org/capnproto/PrimitiveList.java b/runtime/src/main/java/org/capnproto/PrimitiveList.java index f2248a0..f716ac4 100644 --- a/runtime/src/main/java/org/capnproto/PrimitiveList.java +++ b/runtime/src/main/java/org/capnproto/PrimitiveList.java @@ -2,7 +2,19 @@ package org.capnproto; public class PrimitiveList { public static final class Reader { + public final ListReader reader; + public Reader(ListReader reader) { + this.reader = reader; + } + + public int size() { + return this.reader.size(); + } + + public T get(int index) { + throw new Error(); + } } public static final class Builder { diff --git a/runtime/src/main/java/org/capnproto/StructList.java b/runtime/src/main/java/org/capnproto/StructList.java index 78a53ff..5d6e88d 100644 --- a/runtime/src/main/java/org/capnproto/StructList.java +++ b/runtime/src/main/java/org/capnproto/StructList.java @@ -2,7 +2,7 @@ package org.capnproto; public final class StructList { public static final class Reader { - public ListReader reader; + public final ListReader reader; public final FromStructReader factory; public Reader(FromStructReader factory, ListReader reader) { @@ -20,7 +20,7 @@ public final class StructList { } public static final class Builder { - public ListBuilder builder; + public final ListBuilder builder; public final FromStructBuilder factory; public Builder(FromStructBuilder factory, ListBuilder builder) {