Upgrade to protobuf-3.0.0-alpha-3
diff --git a/README.md b/README.md
index 5a935ab..d777a2c 100644
--- a/README.md
+++ b/README.md
@@ -46,7 +46,7 @@
<artifactId>maven-protoc-plugin</artifactId>
<version>0.4.2</version>
<configuration>
- <protocArtifact>com.google.protobuf:protoc:3.0.0-alpha-2:exe:${os.detected.classifier}</protocArtifact>
+ <protocArtifact>com.google.protobuf:protoc:3.0.0-alpha-3:exe:${os.detected.classifier}</protocArtifact>
<pluginId>grpc-java</pluginId>
<pluginArtifact>io.grpc:protoc-gen-grpc-java:0.7.0:exe:${os.detected.classifier}</pluginArtifact>
</configuration>
@@ -89,7 +89,7 @@
}
}
-protocDep = "com.google.protobuf:protoc:3.0.0-alpha-2"
+protocDep = "com.google.protobuf:protoc:3.0.0-alpha-3"
protobufNativeCodeGenPluginDeps = ["grpc:io.grpc:protoc-gen-grpc-java:0.7.0"]
```
@@ -133,13 +133,13 @@
generation. Most users only need to use `skipCodegen=true` as discussed above.
### Build Protobuf
-The codegen plugin is C++ code and requires protobuf 3.0.0-alpha-2.
+The codegen plugin is C++ code and requires protobuf 3.0.0-alpha-3.
For Linux, Mac and MinGW:
```
$ git clone https://github.com/google/protobuf.git
$ cd protobuf
-$ git checkout v3.0.0-alpha-2
+$ git checkout v3.0.0-alpha-3
$ ./autogen.sh
$ ./configure
$ make
@@ -178,15 +178,15 @@
Gradle to find protobuf:
```
.\gradlew install ^
- -PvcProtobufInclude=C:\path\to\protobuf-3.0.0-alpha-2\src ^
- -PvcProtobufLibs=C:\path\to\protobuf-3.0.0-alpha-2\vsprojects\Release
+ -PvcProtobufInclude=C:\path\to\protobuf-3.0.0-alpha-3\src ^
+ -PvcProtobufLibs=C:\path\to\protobuf-3.0.0-alpha-3\vsprojects\Release
```
Since specifying those properties every build is bothersome, you can instead
create ``<project-root>\gradle.properties`` with contents like:
```
-vcProtobufInclude=C:\\path\\to\\protobuf-3.0.0-alpha-2\\src
-vcProtobufLibs=C:\\path\\to\\protobuf-3.0.0-alpha-2\\vsprojects\\Release
+vcProtobufInclude=C:\\path\\to\\protobuf-3.0.0-alpha-3\\src
+vcProtobufLibs=C:\\path\\to\\protobuf-3.0.0-alpha-3\\vsprojects\\Release
```
The build script will build the codegen for the same architecture as the Java
diff --git a/benchmarks/src/generated/main/io/grpc/testing/ClientArgs.java b/benchmarks/src/generated/main/io/grpc/testing/ClientArgs.java
index da34025..2a86b6b 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/ClientArgs.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/ClientArgs.java
@@ -24,8 +24,7 @@
}
private ClientArgs(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -71,10 +70,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -91,21 +91,6 @@
io.grpc.testing.ClientArgs.class, io.grpc.testing.ClientArgs.Builder.class);
}
- public static final com.google.protobuf.Parser<ClientArgs> PARSER =
- new com.google.protobuf.AbstractParser<ClientArgs>() {
- public ClientArgs parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ClientArgs(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<ClientArgs> getParserForType() {
- return PARSER;
- }
-
private int argtypeCase_ = 0;
private java.lang.Object argtype_;
public enum ArgtypeCase
@@ -189,7 +174,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (argtypeCase_ == 1) {
output.writeMessage(1, (io.grpc.testing.ClientConfig) argtype_);
}
@@ -270,12 +254,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.ClientArgs prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.ClientArgs prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -700,16 +689,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.ClientArgs)
- private static final io.grpc.testing.ClientArgs defaultInstance;static {
- defaultInstance = new io.grpc.testing.ClientArgs();
+ private static final io.grpc.testing.ClientArgs DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.ClientArgs();
}
public static io.grpc.testing.ClientArgs getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<ClientArgs> PARSER =
+ new com.google.protobuf.AbstractParser<ClientArgs>() {
+ public ClientArgs parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new ClientArgs(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<ClientArgs> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.ClientArgs getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/ClientConfig.java b/benchmarks/src/generated/main/io/grpc/testing/ClientConfig.java
index e51d885..1f012d2 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/ClientConfig.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/ClientConfig.java
@@ -32,8 +32,7 @@
}
private ClientConfig(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -99,10 +98,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
serverTargets_ = serverTargets_.getUnmodifiableView();
@@ -122,21 +122,6 @@
io.grpc.testing.ClientConfig.class, io.grpc.testing.ClientConfig.Builder.class);
}
- public static final com.google.protobuf.Parser<ClientConfig> PARSER =
- new com.google.protobuf.AbstractParser<ClientConfig>() {
- public ClientConfig parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ClientConfig(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<ClientConfig> getParserForType() {
- return PARSER;
- }
-
private int bitField0_;
public static final int SERVER_TARGETS_FIELD_NUMBER = 1;
private com.google.protobuf.LazyStringList serverTargets_;
@@ -260,7 +245,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
for (int i = 0; i < serverTargets_.size(); i++) {
output.writeBytes(1, serverTargets_.getByteString(i));
}
@@ -388,12 +372,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.ClientConfig prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.ClientConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -899,16 +888,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.ClientConfig)
- private static final io.grpc.testing.ClientConfig defaultInstance;static {
- defaultInstance = new io.grpc.testing.ClientConfig();
+ private static final io.grpc.testing.ClientConfig DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.ClientConfig();
}
public static io.grpc.testing.ClientConfig getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<ClientConfig> PARSER =
+ new com.google.protobuf.AbstractParser<ClientConfig>() {
+ public ClientConfig parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new ClientConfig(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<ClientConfig> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.ClientConfig getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/ClientStats.java b/benchmarks/src/generated/main/io/grpc/testing/ClientStats.java
index 952ee54..35e05f2 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/ClientStats.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/ClientStats.java
@@ -27,8 +27,7 @@
}
private ClientStats(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -76,10 +75,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -96,21 +96,6 @@
io.grpc.testing.ClientStats.class, io.grpc.testing.ClientStats.Builder.class);
}
- public static final com.google.protobuf.Parser<ClientStats> PARSER =
- new com.google.protobuf.AbstractParser<ClientStats>() {
- public ClientStats parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ClientStats(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<ClientStats> getParserForType() {
- return PARSER;
- }
-
public static final int LATENCIES_FIELD_NUMBER = 1;
private io.grpc.testing.HistogramData latencies_;
/**
@@ -171,7 +156,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (latencies_ != null) {
output.writeMessage(1, getLatencies());
}
@@ -266,12 +250,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.ClientStats prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.ClientStats prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -618,16 +607,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.ClientStats)
- private static final io.grpc.testing.ClientStats defaultInstance;static {
- defaultInstance = new io.grpc.testing.ClientStats();
+ private static final io.grpc.testing.ClientStats DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.ClientStats();
}
public static io.grpc.testing.ClientStats getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<ClientStats> PARSER =
+ new com.google.protobuf.AbstractParser<ClientStats>() {
+ public ClientStats parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new ClientStats(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<ClientStats> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.ClientStats getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/ClientStatus.java b/benchmarks/src/generated/main/io/grpc/testing/ClientStatus.java
index 3ade244..bc81068 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/ClientStatus.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/ClientStatus.java
@@ -24,8 +24,7 @@
}
private ClientStatus(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -58,10 +57,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -78,21 +78,6 @@
io.grpc.testing.ClientStatus.class, io.grpc.testing.ClientStatus.Builder.class);
}
- public static final com.google.protobuf.Parser<ClientStatus> PARSER =
- new com.google.protobuf.AbstractParser<ClientStatus>() {
- public ClientStatus parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ClientStatus(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<ClientStatus> getParserForType() {
- return PARSER;
- }
-
public static final int STATS_FIELD_NUMBER = 1;
private io.grpc.testing.ClientStats stats_;
/**
@@ -126,7 +111,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (stats_ != null) {
output.writeMessage(1, getStats());
}
@@ -200,12 +184,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.ClientStatus prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.ClientStatus prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -456,16 +445,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.ClientStatus)
- private static final io.grpc.testing.ClientStatus defaultInstance;static {
- defaultInstance = new io.grpc.testing.ClientStatus();
+ private static final io.grpc.testing.ClientStatus DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.ClientStatus();
}
public static io.grpc.testing.ClientStatus getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<ClientStatus> PARSER =
+ new com.google.protobuf.AbstractParser<ClientStatus>() {
+ public ClientStatus parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new ClientStatus(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<ClientStatus> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.ClientStatus getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/HistogramData.java b/benchmarks/src/generated/main/io/grpc/testing/HistogramData.java
index 5c1c5b3..3a882d1 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/HistogramData.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/HistogramData.java
@@ -30,8 +30,7 @@
}
private HistogramData(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -97,10 +96,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
bucket_ = java.util.Collections.unmodifiableList(bucket_);
@@ -120,21 +120,6 @@
io.grpc.testing.HistogramData.class, io.grpc.testing.HistogramData.Builder.class);
}
- public static final com.google.protobuf.Parser<HistogramData> PARSER =
- new com.google.protobuf.AbstractParser<HistogramData>() {
- public HistogramData parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new HistogramData(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<HistogramData> getParserForType() {
- return PARSER;
- }
-
private int bitField0_;
public static final int BUCKET_FIELD_NUMBER = 1;
private java.util.List<java.lang.Integer> bucket_;
@@ -157,6 +142,7 @@
public int getBucket(int index) {
return bucket_.get(index);
}
+ private int bucketMemoizedSerializedSize = -1;
public static final int MIN_SEEN_FIELD_NUMBER = 2;
private double minSeen_;
@@ -216,8 +202,12 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
getSerializedSize();
+ if (getBucketList().size() > 0) {
+ output.writeRawVarint32(10);
+ output.writeRawVarint32(bucketMemoizedSerializedSize);
+ }
for (int i = 0; i < bucket_.size(); i++) {
- output.writeUInt32(1, bucket_.get(i));
+ output.writeUInt32NoTag(bucket_.get(i));
}
if (minSeen_ != 0D) {
output.writeDouble(2, minSeen_);
@@ -249,7 +239,12 @@
.computeUInt32SizeNoTag(bucket_.get(i));
}
size += dataSize;
- size += 1 * getBucketList().size();
+ if (!getBucketList().isEmpty()) {
+ size += 1;
+ size += com.google.protobuf.CodedOutputStream
+ .computeInt32SizeNoTag(dataSize);
+ }
+ bucketMemoizedSerializedSize = dataSize;
}
if (minSeen_ != 0D) {
size += com.google.protobuf.CodedOutputStream
@@ -329,12 +324,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.HistogramData prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.HistogramData prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -701,16 +701,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.HistogramData)
- private static final io.grpc.testing.HistogramData defaultInstance;static {
- defaultInstance = new io.grpc.testing.HistogramData();
+ private static final io.grpc.testing.HistogramData DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.HistogramData();
}
public static io.grpc.testing.HistogramData getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<HistogramData> PARSER =
+ new com.google.protobuf.AbstractParser<HistogramData>() {
+ public HistogramData parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new HistogramData(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<HistogramData> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.HistogramData getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/Mark.java b/benchmarks/src/generated/main/io/grpc/testing/Mark.java
index 2c8242b..2e4ead8 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/Mark.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/Mark.java
@@ -28,8 +28,7 @@
}
private Mark(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
try {
boolean done = false;
@@ -48,10 +47,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -68,21 +68,6 @@
io.grpc.testing.Mark.class, io.grpc.testing.Mark.Builder.class);
}
- public static final com.google.protobuf.Parser<Mark> PARSER =
- new com.google.protobuf.AbstractParser<Mark>() {
- public Mark parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Mark(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<Mark> getParserForType() {
- return PARSER;
- }
-
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
@@ -95,7 +80,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
}
private int memoizedSerializedSize = -1;
@@ -162,12 +146,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.Mark prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.Mark prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -291,16 +280,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.Mark)
- private static final io.grpc.testing.Mark defaultInstance;static {
- defaultInstance = new io.grpc.testing.Mark();
+ private static final io.grpc.testing.Mark DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.Mark();
}
public static io.grpc.testing.Mark getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<Mark> PARSER =
+ new com.google.protobuf.AbstractParser<Mark>() {
+ public Mark parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new Mark(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<Mark> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.Mark getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/Payload.java b/benchmarks/src/generated/main/io/grpc/testing/Payload.java
index 967e9be..1da836a 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/Payload.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/Payload.java
@@ -26,8 +26,7 @@
}
private Payload(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -58,10 +57,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -78,21 +78,6 @@
io.grpc.testing.Payload.class, io.grpc.testing.Payload.Builder.class);
}
- public static final com.google.protobuf.Parser<Payload> PARSER =
- new com.google.protobuf.AbstractParser<Payload>() {
- public Payload parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Payload(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<Payload> getParserForType() {
- return PARSER;
- }
-
public static final int TYPE_FIELD_NUMBER = 1;
private int type_;
/**
@@ -142,7 +127,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (type_ != io.grpc.testing.PayloadType.COMPRESSABLE.getNumber()) {
output.writeEnum(1, type_);
}
@@ -223,12 +207,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.Payload prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.Payload prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -465,16 +454,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.Payload)
- private static final io.grpc.testing.Payload defaultInstance;static {
- defaultInstance = new io.grpc.testing.Payload();
+ private static final io.grpc.testing.Payload DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.Payload();
}
public static io.grpc.testing.Payload getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<Payload> PARSER =
+ new com.google.protobuf.AbstractParser<Payload>() {
+ public Payload parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new Payload(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<Payload> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.Payload getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/QpsTestProto.java b/benchmarks/src/generated/main/io/grpc/testing/QpsTestProto.java
index 3b5d7e0..e49c0ef 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/QpsTestProto.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/QpsTestProto.java
@@ -8,72 +8,72 @@
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_StatsRequest_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_StatsRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_ServerStats_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_ServerStats_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_Payload_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_Payload_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_HistogramData_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_HistogramData_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_ClientConfig_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_ClientConfig_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_Mark_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_Mark_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_ClientArgs_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_ClientArgs_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_ClientStats_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_ClientStats_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_ClientStatus_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_ClientStatus_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_ServerConfig_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_ServerConfig_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_ServerArgs_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_ServerArgs_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_ServerStatus_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_ServerStatus_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_SimpleRequest_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_SimpleRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_SimpleResponse_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
diff --git a/benchmarks/src/generated/main/io/grpc/testing/ServerArgs.java b/benchmarks/src/generated/main/io/grpc/testing/ServerArgs.java
index 87aa266..581e934 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/ServerArgs.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/ServerArgs.java
@@ -24,8 +24,7 @@
}
private ServerArgs(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -71,10 +70,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -91,21 +91,6 @@
io.grpc.testing.ServerArgs.class, io.grpc.testing.ServerArgs.Builder.class);
}
- public static final com.google.protobuf.Parser<ServerArgs> PARSER =
- new com.google.protobuf.AbstractParser<ServerArgs>() {
- public ServerArgs parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ServerArgs(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<ServerArgs> getParserForType() {
- return PARSER;
- }
-
private int argtypeCase_ = 0;
private java.lang.Object argtype_;
public enum ArgtypeCase
@@ -189,7 +174,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (argtypeCase_ == 1) {
output.writeMessage(1, (io.grpc.testing.ServerConfig) argtype_);
}
@@ -270,12 +254,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.ServerArgs prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.ServerArgs prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -700,16 +689,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.ServerArgs)
- private static final io.grpc.testing.ServerArgs defaultInstance;static {
- defaultInstance = new io.grpc.testing.ServerArgs();
+ private static final io.grpc.testing.ServerArgs DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.ServerArgs();
}
public static io.grpc.testing.ServerArgs getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<ServerArgs> PARSER =
+ new com.google.protobuf.AbstractParser<ServerArgs>() {
+ public ServerArgs parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new ServerArgs(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<ServerArgs> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.ServerArgs getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/ServerConfig.java b/benchmarks/src/generated/main/io/grpc/testing/ServerConfig.java
index 43fbc8c..e08d347 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/ServerConfig.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/ServerConfig.java
@@ -27,8 +27,7 @@
}
private ServerConfig(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -64,10 +63,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -84,21 +84,6 @@
io.grpc.testing.ServerConfig.class, io.grpc.testing.ServerConfig.Builder.class);
}
- public static final com.google.protobuf.Parser<ServerConfig> PARSER =
- new com.google.protobuf.AbstractParser<ServerConfig>() {
- public ServerConfig parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ServerConfig(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<ServerConfig> getParserForType() {
- return PARSER;
- }
-
public static final int SERVER_TYPE_FIELD_NUMBER = 1;
private int serverType_;
/**
@@ -145,7 +130,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (serverType_ != io.grpc.testing.ServerType.SYNCHRONOUS_SERVER.getNumber()) {
output.writeEnum(1, serverType_);
}
@@ -233,12 +217,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.ServerConfig prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.ServerConfig prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -472,16 +461,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.ServerConfig)
- private static final io.grpc.testing.ServerConfig defaultInstance;static {
- defaultInstance = new io.grpc.testing.ServerConfig();
+ private static final io.grpc.testing.ServerConfig DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.ServerConfig();
}
public static io.grpc.testing.ServerConfig getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<ServerConfig> PARSER =
+ new com.google.protobuf.AbstractParser<ServerConfig>() {
+ public ServerConfig parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new ServerConfig(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<ServerConfig> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.ServerConfig getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/ServerStats.java b/benchmarks/src/generated/main/io/grpc/testing/ServerStats.java
index 167bd65..dd3a942 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/ServerStats.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/ServerStats.java
@@ -27,8 +27,7 @@
}
private ServerStats(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -63,10 +62,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -83,21 +83,6 @@
io.grpc.testing.ServerStats.class, io.grpc.testing.ServerStats.Builder.class);
}
- public static final com.google.protobuf.Parser<ServerStats> PARSER =
- new com.google.protobuf.AbstractParser<ServerStats>() {
- public ServerStats parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ServerStats(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<ServerStats> getParserForType() {
- return PARSER;
- }
-
public static final int TIME_ELAPSED_FIELD_NUMBER = 1;
private double timeElapsed_;
/**
@@ -149,7 +134,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (timeElapsed_ != 0D) {
output.writeDouble(1, timeElapsed_);
}
@@ -237,12 +221,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.ServerStats prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.ServerStats prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -494,16 +483,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.ServerStats)
- private static final io.grpc.testing.ServerStats defaultInstance;static {
- defaultInstance = new io.grpc.testing.ServerStats();
+ private static final io.grpc.testing.ServerStats DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.ServerStats();
}
public static io.grpc.testing.ServerStats getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<ServerStats> PARSER =
+ new com.google.protobuf.AbstractParser<ServerStats>() {
+ public ServerStats parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new ServerStats(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<ServerStats> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.ServerStats getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/ServerStatus.java b/benchmarks/src/generated/main/io/grpc/testing/ServerStatus.java
index 734d431..b723a3e 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/ServerStatus.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/ServerStatus.java
@@ -25,8 +25,7 @@
}
private ServerStatus(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -64,10 +63,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -84,21 +84,6 @@
io.grpc.testing.ServerStatus.class, io.grpc.testing.ServerStatus.Builder.class);
}
- public static final com.google.protobuf.Parser<ServerStatus> PARSER =
- new com.google.protobuf.AbstractParser<ServerStatus>() {
- public ServerStatus parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ServerStatus(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<ServerStatus> getParserForType() {
- return PARSER;
- }
-
public static final int STATS_FIELD_NUMBER = 1;
private io.grpc.testing.ServerStats stats_;
/**
@@ -141,7 +126,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (stats_ != null) {
output.writeMessage(1, getStats());
}
@@ -222,12 +206,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.ServerStatus prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.ServerStatus prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -510,16 +499,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.ServerStatus)
- private static final io.grpc.testing.ServerStatus defaultInstance;static {
- defaultInstance = new io.grpc.testing.ServerStatus();
+ private static final io.grpc.testing.ServerStatus DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.ServerStatus();
}
public static io.grpc.testing.ServerStatus getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<ServerStatus> PARSER =
+ new com.google.protobuf.AbstractParser<ServerStatus>() {
+ public ServerStatus parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new ServerStatus(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<ServerStatus> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.ServerStatus getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/SimpleRequest.java b/benchmarks/src/generated/main/io/grpc/testing/SimpleRequest.java
index 901c175..56ab6d8 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/SimpleRequest.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/SimpleRequest.java
@@ -26,8 +26,7 @@
}
private SimpleRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -71,10 +70,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -91,21 +91,6 @@
io.grpc.testing.SimpleRequest.class, io.grpc.testing.SimpleRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<SimpleRequest> PARSER =
- new com.google.protobuf.AbstractParser<SimpleRequest>() {
- public SimpleRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SimpleRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<SimpleRequest> getParserForType() {
- return PARSER;
- }
-
public static final int RESPONSE_TYPE_FIELD_NUMBER = 1;
private int responseType_;
/**
@@ -191,7 +176,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (responseType_ != io.grpc.testing.PayloadType.COMPRESSABLE.getNumber()) {
output.writeEnum(1, responseType_);
}
@@ -279,12 +263,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.SimpleRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.SimpleRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -693,16 +682,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.SimpleRequest)
- private static final io.grpc.testing.SimpleRequest defaultInstance;static {
- defaultInstance = new io.grpc.testing.SimpleRequest();
+ private static final io.grpc.testing.SimpleRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.SimpleRequest();
}
public static io.grpc.testing.SimpleRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<SimpleRequest> PARSER =
+ new com.google.protobuf.AbstractParser<SimpleRequest>() {
+ public SimpleRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new SimpleRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<SimpleRequest> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.SimpleRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/SimpleResponse.java b/benchmarks/src/generated/main/io/grpc/testing/SimpleResponse.java
index 2dda1b4..f3c947c 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/SimpleResponse.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/SimpleResponse.java
@@ -24,8 +24,7 @@
}
private SimpleResponse(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -58,10 +57,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -78,21 +78,6 @@
io.grpc.testing.SimpleResponse.class, io.grpc.testing.SimpleResponse.Builder.class);
}
- public static final com.google.protobuf.Parser<SimpleResponse> PARSER =
- new com.google.protobuf.AbstractParser<SimpleResponse>() {
- public SimpleResponse parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SimpleResponse(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<SimpleResponse> getParserForType() {
- return PARSER;
- }
-
public static final int PAYLOAD_FIELD_NUMBER = 1;
private io.grpc.testing.Payload payload_;
/**
@@ -126,7 +111,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (payload_ != null) {
output.writeMessage(1, getPayload());
}
@@ -200,12 +184,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.SimpleResponse prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.SimpleResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -456,16 +445,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.SimpleResponse)
- private static final io.grpc.testing.SimpleResponse defaultInstance;static {
- defaultInstance = new io.grpc.testing.SimpleResponse();
+ private static final io.grpc.testing.SimpleResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.SimpleResponse();
}
public static io.grpc.testing.SimpleResponse getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<SimpleResponse> PARSER =
+ new com.google.protobuf.AbstractParser<SimpleResponse>() {
+ public SimpleResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new SimpleResponse(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<SimpleResponse> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.SimpleResponse getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/generated/main/io/grpc/testing/StatsRequest.java b/benchmarks/src/generated/main/io/grpc/testing/StatsRequest.java
index a9ab220..4a3fa1a 100644
--- a/benchmarks/src/generated/main/io/grpc/testing/StatsRequest.java
+++ b/benchmarks/src/generated/main/io/grpc/testing/StatsRequest.java
@@ -25,8 +25,7 @@
}
private StatsRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -51,10 +50,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -71,21 +71,6 @@
io.grpc.testing.StatsRequest.class, io.grpc.testing.StatsRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<StatsRequest> PARSER =
- new com.google.protobuf.AbstractParser<StatsRequest>() {
- public StatsRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new StatsRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<StatsRequest> getParserForType() {
- return PARSER;
- }
-
public static final int TEST_NUM_FIELD_NUMBER = 1;
private int testNum_;
/**
@@ -111,7 +96,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (testNum_ != 0) {
output.writeInt32(1, testNum_);
}
@@ -185,12 +169,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.StatsRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.StatsRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -354,16 +343,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.StatsRequest)
- private static final io.grpc.testing.StatsRequest defaultInstance;static {
- defaultInstance = new io.grpc.testing.StatsRequest();
+ private static final io.grpc.testing.StatsRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.StatsRequest();
}
public static io.grpc.testing.StatsRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<StatsRequest> PARSER =
+ new com.google.protobuf.AbstractParser<StatsRequest>() {
+ public StatsRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new StatsRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<StatsRequest> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.StatsRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/benchmarks/src/main/proto/qpstest.proto b/benchmarks/src/main/proto/qpstest.proto
index 8cf7c8f..056383f 100644
--- a/benchmarks/src/main/proto/qpstest.proto
+++ b/benchmarks/src/main/proto/qpstest.proto
@@ -51,7 +51,7 @@
message StatsRequest {
// run number
- optional int32 test_num = 1;
+ int32 test_num = 1;
}
message ServerStats {
diff --git a/build.gradle b/build.gradle
index b2387ee..62d94e6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -43,7 +43,7 @@
protocPluginBaseName = 'protoc-gen-grpc-java'
javaPluginPath = "$rootDir/compiler/build/binaries/java_pluginExecutable/$protocPluginBaseName$exeSuffix"
- protobufVersion = '3.0.0-alpha-2'
+ protobufVersion = '3.0.0-alpha-3'
configureProtoCompilation = {
String generatedSourcePath = 'src/generated'
diff --git a/buildscripts/make_dependencies.sh b/buildscripts/make_dependencies.sh
index afafaa8..e354c6a 100755
--- a/buildscripts/make_dependencies.sh
+++ b/buildscripts/make_dependencies.sh
@@ -5,14 +5,14 @@
# Make protoc
# Can't check for presence of directory as cache auto-creates it.
-if [ -f /tmp/proto3-a2/bin/protoc ]; then
+if [ -f /tmp/proto3-a3/bin/protoc ]; then
echo "Not building protobuf. Already built"
else
- wget -O - https://github.com/google/protobuf/archive/v3.0.0-alpha-2.tar.gz | tar xz -C /tmp
- pushd /tmp/protobuf-3.0.0-alpha-2
+ wget -O - https://github.com/google/protobuf/archive/v3.0.0-alpha-3.tar.gz | tar xz -C /tmp
+ pushd /tmp/protobuf-3.0.0-alpha-3
./autogen.sh
# install here so we don't need sudo
- ./configure --prefix=/tmp/proto3-a2
+ ./configure --prefix=/tmp/proto3-a3
make -j2
make install
popd
diff --git a/compiler/Dockerfile b/compiler/Dockerfile
index 4994f64..84df560 100644
--- a/compiler/Dockerfile
+++ b/compiler/Dockerfile
@@ -1,7 +1,7 @@
FROM protoc-artifacts:latest
RUN scl enable devtoolset-1.1 'bash -c "cd /protobuf && \
- git checkout v3.0.0-alpha-2 && \
+ git checkout v3.0.0-alpha-3 && \
./autogen.sh && \
CXXFLAGS=-m32 ./configure --disable-shared --prefix=/protobuf-32 && \
make clean && make && make install"'
diff --git a/compiler/README.md b/compiler/README.md
index f9c6b6a..df4a5b1 100644
--- a/compiler/README.md
+++ b/compiler/README.md
@@ -13,7 +13,7 @@
* Linux, Mac OS X with Clang, or Windows with MSYS2
* Java 7 or up
-* [Protobuf](https://github.com/google/protobuf) 3.0.0-alpha-2 or up
+* [Protobuf](https://github.com/google/protobuf) 3.0.0-alpha-3 or up
## Compiling and testing the codegen
Change to the `compiler` directory:
diff --git a/examples/src/generated/main/io/grpc/examples/helloworld/HelloRequest.java b/examples/src/generated/main/io/grpc/examples/helloworld/HelloRequest.java
index 75b4551..bd6f9db 100644
--- a/examples/src/generated/main/io/grpc/examples/helloworld/HelloRequest.java
+++ b/examples/src/generated/main/io/grpc/examples/helloworld/HelloRequest.java
@@ -29,8 +29,7 @@
}
private HelloRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -56,10 +55,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -76,23 +76,8 @@
io.grpc.examples.helloworld.HelloRequest.class, io.grpc.examples.helloworld.HelloRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<HelloRequest> PARSER =
- new com.google.protobuf.AbstractParser<HelloRequest>() {
- public HelloRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new HelloRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<HelloRequest> getParserForType() {
- return PARSER;
- }
-
public static final int NAME_FIELD_NUMBER = 1;
- private java.lang.Object name_;
+ private volatile java.lang.Object name_;
/**
* <code>optional string name = 1;</code>
*/
@@ -139,7 +124,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (!getNameBytes().isEmpty()) {
output.writeBytes(1, getNameBytes());
}
@@ -213,12 +197,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.examples.helloworld.HelloRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.examples.helloworld.HelloRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -419,16 +408,41 @@
}
// @@protoc_insertion_point(class_scope:helloworld.HelloRequest)
- private static final io.grpc.examples.helloworld.HelloRequest defaultInstance;static {
- defaultInstance = new io.grpc.examples.helloworld.HelloRequest();
+ private static final io.grpc.examples.helloworld.HelloRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.examples.helloworld.HelloRequest();
}
public static io.grpc.examples.helloworld.HelloRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<HelloRequest> PARSER =
+ new com.google.protobuf.AbstractParser<HelloRequest>() {
+ public HelloRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new HelloRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<HelloRequest> getParserForType() {
+ return PARSER;
}
public io.grpc.examples.helloworld.HelloRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/examples/src/generated/main/io/grpc/examples/helloworld/HelloResponse.java b/examples/src/generated/main/io/grpc/examples/helloworld/HelloResponse.java
index 82d2b05..de1a3e7 100644
--- a/examples/src/generated/main/io/grpc/examples/helloworld/HelloResponse.java
+++ b/examples/src/generated/main/io/grpc/examples/helloworld/HelloResponse.java
@@ -29,8 +29,7 @@
}
private HelloResponse(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -56,10 +55,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -76,23 +76,8 @@
io.grpc.examples.helloworld.HelloResponse.class, io.grpc.examples.helloworld.HelloResponse.Builder.class);
}
- public static final com.google.protobuf.Parser<HelloResponse> PARSER =
- new com.google.protobuf.AbstractParser<HelloResponse>() {
- public HelloResponse parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new HelloResponse(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<HelloResponse> getParserForType() {
- return PARSER;
- }
-
public static final int MESSAGE_FIELD_NUMBER = 1;
- private java.lang.Object message_;
+ private volatile java.lang.Object message_;
/**
* <code>optional string message = 1;</code>
*/
@@ -139,7 +124,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (!getMessageBytes().isEmpty()) {
output.writeBytes(1, getMessageBytes());
}
@@ -213,12 +197,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.examples.helloworld.HelloResponse prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.examples.helloworld.HelloResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -419,16 +408,41 @@
}
// @@protoc_insertion_point(class_scope:helloworld.HelloResponse)
- private static final io.grpc.examples.helloworld.HelloResponse defaultInstance;static {
- defaultInstance = new io.grpc.examples.helloworld.HelloResponse();
+ private static final io.grpc.examples.helloworld.HelloResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.examples.helloworld.HelloResponse();
}
public static io.grpc.examples.helloworld.HelloResponse getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<HelloResponse> PARSER =
+ new com.google.protobuf.AbstractParser<HelloResponse>() {
+ public HelloResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new HelloResponse(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<HelloResponse> getParserForType() {
+ return PARSER;
}
public io.grpc.examples.helloworld.HelloResponse getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/examples/src/generated/main/io/grpc/examples/helloworld/HelloWorldProto.java b/examples/src/generated/main/io/grpc/examples/helloworld/HelloWorldProto.java
index 3c80f40..6da68a2 100644
--- a/examples/src/generated/main/io/grpc/examples/helloworld/HelloWorldProto.java
+++ b/examples/src/generated/main/io/grpc/examples/helloworld/HelloWorldProto.java
@@ -8,12 +8,12 @@
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_helloworld_HelloRequest_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_helloworld_HelloRequest_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_helloworld_HelloResponse_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/Feature.java b/examples/src/generated/main/io/grpc/examples/routeguide/Feature.java
index 6effc4e..7e5f084 100644
--- a/examples/src/generated/main/io/grpc/examples/routeguide/Feature.java
+++ b/examples/src/generated/main/io/grpc/examples/routeguide/Feature.java
@@ -30,8 +30,7 @@
}
private Feature(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -70,10 +69,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -90,23 +90,8 @@
io.grpc.examples.routeguide.Feature.class, io.grpc.examples.routeguide.Feature.Builder.class);
}
- public static final com.google.protobuf.Parser<Feature> PARSER =
- new com.google.protobuf.AbstractParser<Feature>() {
- public Feature parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Feature(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<Feature> getParserForType() {
- return PARSER;
- }
-
public static final int NAME_FIELD_NUMBER = 1;
- private java.lang.Object name_;
+ private volatile java.lang.Object name_;
/**
* <code>optional string name = 1;</code>
*
@@ -194,7 +179,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (!getNameBytes().isEmpty()) {
output.writeBytes(1, getNameBytes());
}
@@ -275,12 +259,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.examples.routeguide.Feature prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.examples.routeguide.Feature prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -669,16 +658,41 @@
}
// @@protoc_insertion_point(class_scope:routeguide.Feature)
- private static final io.grpc.examples.routeguide.Feature defaultInstance;static {
- defaultInstance = new io.grpc.examples.routeguide.Feature();
+ private static final io.grpc.examples.routeguide.Feature DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.examples.routeguide.Feature();
}
public static io.grpc.examples.routeguide.Feature getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<Feature> PARSER =
+ new com.google.protobuf.AbstractParser<Feature>() {
+ public Feature parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new Feature(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<Feature> getParserForType() {
+ return PARSER;
}
public io.grpc.examples.routeguide.Feature getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/Point.java b/examples/src/generated/main/io/grpc/examples/routeguide/Point.java
index 417e088..41bfb91 100644
--- a/examples/src/generated/main/io/grpc/examples/routeguide/Point.java
+++ b/examples/src/generated/main/io/grpc/examples/routeguide/Point.java
@@ -33,8 +33,7 @@
}
private Point(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -64,10 +63,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -84,21 +84,6 @@
io.grpc.examples.routeguide.Point.class, io.grpc.examples.routeguide.Point.Builder.class);
}
- public static final com.google.protobuf.Parser<Point> PARSER =
- new com.google.protobuf.AbstractParser<Point>() {
- public Point parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Point(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<Point> getParserForType() {
- return PARSER;
- }
-
public static final int LATITUDE_FIELD_NUMBER = 1;
private int latitude_;
/**
@@ -129,7 +114,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (latitude_ != 0) {
output.writeInt32(1, latitude_);
}
@@ -210,12 +194,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.examples.routeguide.Point prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.examples.routeguide.Point prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -406,16 +395,41 @@
}
// @@protoc_insertion_point(class_scope:routeguide.Point)
- private static final io.grpc.examples.routeguide.Point defaultInstance;static {
- defaultInstance = new io.grpc.examples.routeguide.Point();
+ private static final io.grpc.examples.routeguide.Point DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.examples.routeguide.Point();
}
public static io.grpc.examples.routeguide.Point getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<Point> PARSER =
+ new com.google.protobuf.AbstractParser<Point>() {
+ public Point parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new Point(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<Point> getParserForType() {
+ return PARSER;
}
public io.grpc.examples.routeguide.Point getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/Rectangle.java b/examples/src/generated/main/io/grpc/examples/routeguide/Rectangle.java
index d3a0561..7eee9bd 100644
--- a/examples/src/generated/main/io/grpc/examples/routeguide/Rectangle.java
+++ b/examples/src/generated/main/io/grpc/examples/routeguide/Rectangle.java
@@ -29,8 +29,7 @@
}
private Rectangle(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -76,10 +75,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -96,21 +96,6 @@
io.grpc.examples.routeguide.Rectangle.class, io.grpc.examples.routeguide.Rectangle.Builder.class);
}
- public static final com.google.protobuf.Parser<Rectangle> PARSER =
- new com.google.protobuf.AbstractParser<Rectangle>() {
- public Rectangle parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Rectangle(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<Rectangle> getParserForType() {
- return PARSER;
- }
-
public static final int LO_FIELD_NUMBER = 1;
private io.grpc.examples.routeguide.Point lo_;
/**
@@ -189,7 +174,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (lo_ != null) {
output.writeMessage(1, getLo());
}
@@ -270,12 +254,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.examples.routeguide.Rectangle prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.examples.routeguide.Rectangle prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -734,16 +723,41 @@
}
// @@protoc_insertion_point(class_scope:routeguide.Rectangle)
- private static final io.grpc.examples.routeguide.Rectangle defaultInstance;static {
- defaultInstance = new io.grpc.examples.routeguide.Rectangle();
+ private static final io.grpc.examples.routeguide.Rectangle DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.examples.routeguide.Rectangle();
}
public static io.grpc.examples.routeguide.Rectangle getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<Rectangle> PARSER =
+ new com.google.protobuf.AbstractParser<Rectangle>() {
+ public Rectangle parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new Rectangle(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<Rectangle> getParserForType() {
+ return PARSER;
}
public io.grpc.examples.routeguide.Rectangle getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/RouteGuideProto.java b/examples/src/generated/main/io/grpc/examples/routeguide/RouteGuideProto.java
index 59c0c33..aecc55e 100644
--- a/examples/src/generated/main/io/grpc/examples/routeguide/RouteGuideProto.java
+++ b/examples/src/generated/main/io/grpc/examples/routeguide/RouteGuideProto.java
@@ -8,27 +8,27 @@
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
}
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_routeguide_Point_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_routeguide_Point_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_routeguide_Rectangle_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_routeguide_Rectangle_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_routeguide_Feature_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_routeguide_Feature_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_routeguide_RouteNote_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_routeguide_RouteNote_fieldAccessorTable;
- static final com.google.protobuf.Descriptors.Descriptor
+ static com.google.protobuf.Descriptors.Descriptor
internal_static_routeguide_RouteSummary_descriptor;
static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/RouteNote.java b/examples/src/generated/main/io/grpc/examples/routeguide/RouteNote.java
index 738981a..e583d7b 100644
--- a/examples/src/generated/main/io/grpc/examples/routeguide/RouteNote.java
+++ b/examples/src/generated/main/io/grpc/examples/routeguide/RouteNote.java
@@ -29,8 +29,7 @@
}
private RouteNote(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -69,10 +68,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -89,21 +89,6 @@
io.grpc.examples.routeguide.RouteNote.class, io.grpc.examples.routeguide.RouteNote.Builder.class);
}
- public static final com.google.protobuf.Parser<RouteNote> PARSER =
- new com.google.protobuf.AbstractParser<RouteNote>() {
- public RouteNote parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new RouteNote(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<RouteNote> getParserForType() {
- return PARSER;
- }
-
public static final int LOCATION_FIELD_NUMBER = 1;
private io.grpc.examples.routeguide.Point location_;
/**
@@ -138,7 +123,7 @@
}
public static final int MESSAGE_FIELD_NUMBER = 2;
- private java.lang.Object message_;
+ private volatile java.lang.Object message_;
/**
* <code>optional string message = 2;</code>
*
@@ -193,7 +178,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (location_ != null) {
output.writeMessage(1, getLocation());
}
@@ -274,12 +258,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.examples.routeguide.RouteNote prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.examples.routeguide.RouteNote prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -667,16 +656,41 @@
}
// @@protoc_insertion_point(class_scope:routeguide.RouteNote)
- private static final io.grpc.examples.routeguide.RouteNote defaultInstance;static {
- defaultInstance = new io.grpc.examples.routeguide.RouteNote();
+ private static final io.grpc.examples.routeguide.RouteNote DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.examples.routeguide.RouteNote();
}
public static io.grpc.examples.routeguide.RouteNote getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<RouteNote> PARSER =
+ new com.google.protobuf.AbstractParser<RouteNote>() {
+ public RouteNote parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new RouteNote(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<RouteNote> getParserForType() {
+ return PARSER;
}
public io.grpc.examples.routeguide.RouteNote getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/examples/src/generated/main/io/grpc/examples/routeguide/RouteSummary.java b/examples/src/generated/main/io/grpc/examples/routeguide/RouteSummary.java
index 5fbcea6..98ff2ec 100644
--- a/examples/src/generated/main/io/grpc/examples/routeguide/RouteSummary.java
+++ b/examples/src/generated/main/io/grpc/examples/routeguide/RouteSummary.java
@@ -35,8 +35,7 @@
}
private RouteSummary(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -76,10 +75,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -96,21 +96,6 @@
io.grpc.examples.routeguide.RouteSummary.class, io.grpc.examples.routeguide.RouteSummary.Builder.class);
}
- public static final com.google.protobuf.Parser<RouteSummary> PARSER =
- new com.google.protobuf.AbstractParser<RouteSummary>() {
- public RouteSummary parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new RouteSummary(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<RouteSummary> getParserForType() {
- return PARSER;
- }
-
public static final int POINT_COUNT_FIELD_NUMBER = 1;
private int pointCount_;
/**
@@ -175,7 +160,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (pointCount_ != 0) {
output.writeInt32(1, pointCount_);
}
@@ -270,12 +254,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.examples.routeguide.RouteSummary prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.examples.routeguide.RouteSummary prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -578,16 +567,41 @@
}
// @@protoc_insertion_point(class_scope:routeguide.RouteSummary)
- private static final io.grpc.examples.routeguide.RouteSummary defaultInstance;static {
- defaultInstance = new io.grpc.examples.routeguide.RouteSummary();
+ private static final io.grpc.examples.routeguide.RouteSummary DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.examples.routeguide.RouteSummary();
}
public static io.grpc.examples.routeguide.RouteSummary getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<RouteSummary> PARSER =
+ new com.google.protobuf.AbstractParser<RouteSummary>() {
+ public RouteSummary parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new RouteSummary(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<RouteSummary> getParserForType() {
+ return PARSER;
}
public io.grpc.examples.routeguide.RouteSummary getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
diff --git a/interop-testing/src/generated/main/com/google/protobuf/EmptyProtos.java b/interop-testing/src/generated/main/com/google/protobuf/EmptyProtos.java
index 2c018d6..02b1e3a 100644
--- a/interop-testing/src/generated/main/com/google/protobuf/EmptyProtos.java
+++ b/interop-testing/src/generated/main/com/google/protobuf/EmptyProtos.java
@@ -42,8 +42,7 @@
}
private Empty(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
@@ -65,10 +64,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
@@ -86,21 +86,6 @@
com.google.protobuf.EmptyProtos.Empty.class, com.google.protobuf.EmptyProtos.Empty.Builder.class);
}
- public static final com.google.protobuf.Parser<Empty> PARSER =
- new com.google.protobuf.AbstractParser<Empty>() {
- public Empty parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Empty(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<Empty> getParserForType() {
- return PARSER;
- }
-
private byte memoizedIsInitialized = -1;
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
@@ -113,7 +98,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
unknownFields.writeTo(output);
}
@@ -182,12 +166,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(com.google.protobuf.EmptyProtos.Empty prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(com.google.protobuf.EmptyProtos.Empty prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -307,21 +296,46 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.Empty)
- private static final com.google.protobuf.EmptyProtos.Empty defaultInstance;static {
- defaultInstance = new com.google.protobuf.EmptyProtos.Empty();
+ private static final com.google.protobuf.EmptyProtos.Empty DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new com.google.protobuf.EmptyProtos.Empty();
}
public static com.google.protobuf.EmptyProtos.Empty getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<Empty> PARSER =
+ new com.google.protobuf.AbstractParser<Empty>() {
+ public Empty parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new Empty(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<Empty> getParserForType() {
+ return PARSER;
}
public com.google.protobuf.EmptyProtos.Empty getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
- private static final com.google.protobuf.Descriptors.Descriptor
+ private static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_Empty_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
diff --git a/interop-testing/src/generated/main/io/grpc/testing/integration/Messages.java b/interop-testing/src/generated/main/io/grpc/testing/integration/Messages.java
index 9a58d05..221e4d1 100644
--- a/interop-testing/src/generated/main/io/grpc/testing/integration/Messages.java
+++ b/interop-testing/src/generated/main/io/grpc/testing/integration/Messages.java
@@ -194,8 +194,7 @@
}
private Payload(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -226,10 +225,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -246,21 +246,6 @@
io.grpc.testing.integration.Messages.Payload.class, io.grpc.testing.integration.Messages.Payload.Builder.class);
}
- public static final com.google.protobuf.Parser<Payload> PARSER =
- new com.google.protobuf.AbstractParser<Payload>() {
- public Payload parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Payload(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<Payload> getParserForType() {
- return PARSER;
- }
-
public static final int TYPE_FIELD_NUMBER = 1;
private int type_;
/**
@@ -310,7 +295,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (type_ != io.grpc.testing.integration.Messages.PayloadType.COMPRESSABLE.getNumber()) {
output.writeEnum(1, type_);
}
@@ -391,12 +375,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.integration.Messages.Payload prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.integration.Messages.Payload prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -637,16 +626,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.Payload)
- private static final io.grpc.testing.integration.Messages.Payload defaultInstance;static {
- defaultInstance = new io.grpc.testing.integration.Messages.Payload();
+ private static final io.grpc.testing.integration.Messages.Payload DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.Payload();
}
public static io.grpc.testing.integration.Messages.Payload getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<Payload> PARSER =
+ new com.google.protobuf.AbstractParser<Payload>() {
+ public Payload parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new Payload(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<Payload> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.integration.Messages.Payload getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -756,8 +770,7 @@
}
private SimpleRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -811,10 +824,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -831,21 +845,6 @@
io.grpc.testing.integration.Messages.SimpleRequest.class, io.grpc.testing.integration.Messages.SimpleRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<SimpleRequest> PARSER =
- new com.google.protobuf.AbstractParser<SimpleRequest>() {
- public SimpleRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SimpleRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<SimpleRequest> getParserForType() {
- return PARSER;
- }
-
public static final int RESPONSE_TYPE_FIELD_NUMBER = 1;
private int responseType_;
/**
@@ -957,7 +956,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (responseType_ != io.grpc.testing.integration.Messages.PayloadType.COMPRESSABLE.getNumber()) {
output.writeEnum(1, responseType_);
}
@@ -1059,12 +1057,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.integration.Messages.SimpleRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.integration.Messages.SimpleRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -1565,16 +1568,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.SimpleRequest)
- private static final io.grpc.testing.integration.Messages.SimpleRequest defaultInstance;static {
- defaultInstance = new io.grpc.testing.integration.Messages.SimpleRequest();
+ private static final io.grpc.testing.integration.Messages.SimpleRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.SimpleRequest();
}
public static io.grpc.testing.integration.Messages.SimpleRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<SimpleRequest> PARSER =
+ new com.google.protobuf.AbstractParser<SimpleRequest>() {
+ public SimpleRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new SimpleRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<SimpleRequest> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.integration.Messages.SimpleRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -1673,8 +1701,7 @@
}
private SimpleResponse(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -1719,10 +1746,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -1739,21 +1767,6 @@
io.grpc.testing.integration.Messages.SimpleResponse.class, io.grpc.testing.integration.Messages.SimpleResponse.Builder.class);
}
- public static final com.google.protobuf.Parser<SimpleResponse> PARSER =
- new com.google.protobuf.AbstractParser<SimpleResponse>() {
- public SimpleResponse parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SimpleResponse(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<SimpleResponse> getParserForType() {
- return PARSER;
- }
-
public static final int PAYLOAD_FIELD_NUMBER = 1;
private io.grpc.testing.integration.Messages.Payload payload_;
/**
@@ -1788,7 +1801,7 @@
}
public static final int USERNAME_FIELD_NUMBER = 2;
- private java.lang.Object username_;
+ private volatile java.lang.Object username_;
/**
* <code>optional string username = 2;</code>
*
@@ -1834,7 +1847,7 @@
}
public static final int OAUTH_SCOPE_FIELD_NUMBER = 3;
- private java.lang.Object oauthScope_;
+ private volatile java.lang.Object oauthScope_;
/**
* <code>optional string oauth_scope = 3;</code>
*
@@ -1889,7 +1902,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (payload_ != null) {
output.writeMessage(1, getPayload());
}
@@ -1977,12 +1989,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.integration.Messages.SimpleResponse prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.integration.Messages.SimpleResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -2472,16 +2489,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.SimpleResponse)
- private static final io.grpc.testing.integration.Messages.SimpleResponse defaultInstance;static {
- defaultInstance = new io.grpc.testing.integration.Messages.SimpleResponse();
+ private static final io.grpc.testing.integration.Messages.SimpleResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.SimpleResponse();
}
public static io.grpc.testing.integration.Messages.SimpleResponse getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<SimpleResponse> PARSER =
+ new com.google.protobuf.AbstractParser<SimpleResponse>() {
+ public SimpleResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new SimpleResponse(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<SimpleResponse> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.integration.Messages.SimpleResponse getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -2522,8 +2564,7 @@
}
private SimpleContext(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -2549,10 +2590,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -2569,23 +2611,8 @@
io.grpc.testing.integration.Messages.SimpleContext.class, io.grpc.testing.integration.Messages.SimpleContext.Builder.class);
}
- public static final com.google.protobuf.Parser<SimpleContext> PARSER =
- new com.google.protobuf.AbstractParser<SimpleContext>() {
- public SimpleContext parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SimpleContext(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<SimpleContext> getParserForType() {
- return PARSER;
- }
-
public static final int VALUE_FIELD_NUMBER = 1;
- private java.lang.Object value_;
+ private volatile java.lang.Object value_;
/**
* <code>optional string value = 1;</code>
*/
@@ -2632,7 +2659,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (!getValueBytes().isEmpty()) {
output.writeBytes(1, getValueBytes());
}
@@ -2706,12 +2732,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.integration.Messages.SimpleContext prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.integration.Messages.SimpleContext prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -2908,16 +2939,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.SimpleContext)
- private static final io.grpc.testing.integration.Messages.SimpleContext defaultInstance;static {
- defaultInstance = new io.grpc.testing.integration.Messages.SimpleContext();
+ private static final io.grpc.testing.integration.Messages.SimpleContext DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.SimpleContext();
}
public static io.grpc.testing.integration.Messages.SimpleContext getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<SimpleContext> PARSER =
+ new com.google.protobuf.AbstractParser<SimpleContext>() {
+ public SimpleContext parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new SimpleContext(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<SimpleContext> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.integration.Messages.SimpleContext getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -2976,8 +3032,7 @@
}
private StreamingInputCallRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -3010,10 +3065,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -3030,21 +3086,6 @@
io.grpc.testing.integration.Messages.StreamingInputCallRequest.class, io.grpc.testing.integration.Messages.StreamingInputCallRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<StreamingInputCallRequest> PARSER =
- new com.google.protobuf.AbstractParser<StreamingInputCallRequest>() {
- public StreamingInputCallRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new StreamingInputCallRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<StreamingInputCallRequest> getParserForType() {
- return PARSER;
- }
-
public static final int PAYLOAD_FIELD_NUMBER = 1;
private io.grpc.testing.integration.Messages.Payload payload_;
/**
@@ -3090,7 +3131,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (payload_ != null) {
output.writeMessage(1, getPayload());
}
@@ -3164,12 +3204,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.integration.Messages.StreamingInputCallRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.integration.Messages.StreamingInputCallRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -3460,16 +3505,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.StreamingInputCallRequest)
- private static final io.grpc.testing.integration.Messages.StreamingInputCallRequest defaultInstance;static {
- defaultInstance = new io.grpc.testing.integration.Messages.StreamingInputCallRequest();
+ private static final io.grpc.testing.integration.Messages.StreamingInputCallRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.StreamingInputCallRequest();
}
public static io.grpc.testing.integration.Messages.StreamingInputCallRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<StreamingInputCallRequest> PARSER =
+ new com.google.protobuf.AbstractParser<StreamingInputCallRequest>() {
+ public StreamingInputCallRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new StreamingInputCallRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<StreamingInputCallRequest> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.integration.Messages.StreamingInputCallRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -3513,8 +3583,7 @@
}
private StreamingInputCallResponse(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -3539,10 +3608,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -3559,21 +3629,6 @@
io.grpc.testing.integration.Messages.StreamingInputCallResponse.class, io.grpc.testing.integration.Messages.StreamingInputCallResponse.Builder.class);
}
- public static final com.google.protobuf.Parser<StreamingInputCallResponse> PARSER =
- new com.google.protobuf.AbstractParser<StreamingInputCallResponse>() {
- public StreamingInputCallResponse parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new StreamingInputCallResponse(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<StreamingInputCallResponse> getParserForType() {
- return PARSER;
- }
-
public static final int AGGREGATED_PAYLOAD_SIZE_FIELD_NUMBER = 1;
private int aggregatedPayloadSize_;
/**
@@ -3599,7 +3654,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (aggregatedPayloadSize_ != 0) {
output.writeInt32(1, aggregatedPayloadSize_);
}
@@ -3673,12 +3727,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.integration.Messages.StreamingInputCallResponse prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.integration.Messages.StreamingInputCallResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -3846,16 +3905,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.StreamingInputCallResponse)
- private static final io.grpc.testing.integration.Messages.StreamingInputCallResponse defaultInstance;static {
- defaultInstance = new io.grpc.testing.integration.Messages.StreamingInputCallResponse();
+ private static final io.grpc.testing.integration.Messages.StreamingInputCallResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.StreamingInputCallResponse();
}
public static io.grpc.testing.integration.Messages.StreamingInputCallResponse getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<StreamingInputCallResponse> PARSER =
+ new com.google.protobuf.AbstractParser<StreamingInputCallResponse>() {
+ public StreamingInputCallResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new StreamingInputCallResponse(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<StreamingInputCallResponse> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.integration.Messages.StreamingInputCallResponse getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -3911,8 +3995,7 @@
}
private ResponseParameters(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -3942,10 +4025,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -3962,21 +4046,6 @@
io.grpc.testing.integration.Messages.ResponseParameters.class, io.grpc.testing.integration.Messages.ResponseParameters.Builder.class);
}
- public static final com.google.protobuf.Parser<ResponseParameters> PARSER =
- new com.google.protobuf.AbstractParser<ResponseParameters>() {
- public ResponseParameters parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ResponseParameters(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<ResponseParameters> getParserForType() {
- return PARSER;
- }
-
public static final int SIZE_FIELD_NUMBER = 1;
private int size_;
/**
@@ -4017,7 +4086,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (size_ != 0) {
output.writeInt32(1, size_);
}
@@ -4098,12 +4166,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.integration.Messages.ResponseParameters prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.integration.Messages.ResponseParameters prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -4321,16 +4394,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.ResponseParameters)
- private static final io.grpc.testing.integration.Messages.ResponseParameters defaultInstance;static {
- defaultInstance = new io.grpc.testing.integration.Messages.ResponseParameters();
+ private static final io.grpc.testing.integration.Messages.ResponseParameters DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.ResponseParameters();
}
public static io.grpc.testing.integration.Messages.ResponseParameters getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<ResponseParameters> PARSER =
+ new com.google.protobuf.AbstractParser<ResponseParameters>() {
+ public ResponseParameters parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new ResponseParameters(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<ResponseParameters> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.integration.Messages.ResponseParameters getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -4458,8 +4556,7 @@
}
private StreamingOutputCallRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -4506,10 +4603,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
responseParameters_ = java.util.Collections.unmodifiableList(responseParameters_);
@@ -4529,21 +4627,6 @@
io.grpc.testing.integration.Messages.StreamingOutputCallRequest.class, io.grpc.testing.integration.Messages.StreamingOutputCallRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<StreamingOutputCallRequest> PARSER =
- new com.google.protobuf.AbstractParser<StreamingOutputCallRequest>() {
- public StreamingOutputCallRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new StreamingOutputCallRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<StreamingOutputCallRequest> getParserForType() {
- return PARSER;
- }
-
private int bitField0_;
public static final int RESPONSE_TYPE_FIELD_NUMBER = 1;
private int responseType_;
@@ -4675,7 +4758,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (responseType_ != io.grpc.testing.integration.Messages.PayloadType.COMPRESSABLE.getNumber()) {
output.writeEnum(1, responseType_);
}
@@ -4763,12 +4845,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.integration.Messages.StreamingOutputCallRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.integration.Messages.StreamingOutputCallRequest prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -5502,16 +5589,41 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.StreamingOutputCallRequest)
- private static final io.grpc.testing.integration.Messages.StreamingOutputCallRequest defaultInstance;static {
- defaultInstance = new io.grpc.testing.integration.Messages.StreamingOutputCallRequest();
+ private static final io.grpc.testing.integration.Messages.StreamingOutputCallRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.StreamingOutputCallRequest();
}
public static io.grpc.testing.integration.Messages.StreamingOutputCallRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<StreamingOutputCallRequest> PARSER =
+ new com.google.protobuf.AbstractParser<StreamingOutputCallRequest>() {
+ public StreamingOutputCallRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new StreamingOutputCallRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<StreamingOutputCallRequest> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.integration.Messages.StreamingOutputCallRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -5570,8 +5682,7 @@
}
private StreamingOutputCallResponse(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -5604,10 +5715,11 @@
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -5624,21 +5736,6 @@
io.grpc.testing.integration.Messages.StreamingOutputCallResponse.class, io.grpc.testing.integration.Messages.StreamingOutputCallResponse.Builder.class);
}
- public static final com.google.protobuf.Parser<StreamingOutputCallResponse> PARSER =
- new com.google.protobuf.AbstractParser<StreamingOutputCallResponse>() {
- public StreamingOutputCallResponse parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new StreamingOutputCallResponse(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<StreamingOutputCallResponse> getParserForType() {
- return PARSER;
- }
-
public static final int PAYLOAD_FIELD_NUMBER = 1;
private io.grpc.testing.integration.Messages.Payload payload_;
/**
@@ -5684,7 +5781,6 @@
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (payload_ != null) {
output.writeMessage(1, getPayload());
}
@@ -5758,12 +5854,17 @@
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(io.grpc.testing.integration.Messages.StreamingOutputCallResponse prototype) {
- return newBuilder().mergeFrom(prototype);
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
}
- public Builder toBuilder() { return newBuilder(this); }
+ public static Builder newBuilder(io.grpc.testing.integration.Messages.StreamingOutputCallResponse prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
+ }
@java.lang.Override
protected Builder newBuilderForType(
@@ -6054,61 +6155,86 @@
}
// @@protoc_insertion_point(class_scope:grpc.testing.StreamingOutputCallResponse)
- private static final io.grpc.testing.integration.Messages.StreamingOutputCallResponse defaultInstance;static {
- defaultInstance = new io.grpc.testing.integration.Messages.StreamingOutputCallResponse();
+ private static final io.grpc.testing.integration.Messages.StreamingOutputCallResponse DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new io.grpc.testing.integration.Messages.StreamingOutputCallResponse();
}
public static io.grpc.testing.integration.Messages.StreamingOutputCallResponse getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ public static final com.google.protobuf.Parser<StreamingOutputCallResponse> PARSER =
+ new com.google.protobuf.AbstractParser<StreamingOutputCallResponse>() {
+ public StreamingOutputCallResponse parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new StreamingOutputCallResponse(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<StreamingOutputCallResponse> getParserForType() {
+ return PARSER;
}
public io.grpc.testing.integration.Messages.StreamingOutputCallResponse getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
- private static final com.google.protobuf.Descriptors.Descriptor
+ private static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_Payload_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_Payload_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
+ private static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_SimpleRequest_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_SimpleRequest_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
+ private static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_SimpleResponse_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_SimpleResponse_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
+ private static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_SimpleContext_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_SimpleContext_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
+ private static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_StreamingInputCallRequest_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_StreamingInputCallRequest_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
+ private static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_StreamingInputCallResponse_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_StreamingInputCallResponse_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
+ private static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_ResponseParameters_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_ResponseParameters_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
+ private static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_StreamingOutputCallRequest_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
internal_static_grpc_testing_StreamingOutputCallRequest_fieldAccessorTable;
- private static final com.google.protobuf.Descriptors.Descriptor
+ private static com.google.protobuf.Descriptors.Descriptor
internal_static_grpc_testing_StreamingOutputCallResponse_descriptor;
private static
com.google.protobuf.GeneratedMessage.FieldAccessorTable
diff --git a/interop-testing/src/main/proto/io/grpc/testing/integration/messages.proto b/interop-testing/src/main/proto/io/grpc/testing/integration/messages.proto
index 9c6656b..809224c 100644
--- a/interop-testing/src/main/proto/io/grpc/testing/integration/messages.proto
+++ b/interop-testing/src/main/proto/io/grpc/testing/integration/messages.proto
@@ -51,50 +51,50 @@
// A block of data, to simply increase gRPC message size.
message Payload {
// The type of data in body.
- optional PayloadType type = 1;
+ PayloadType type = 1;
// Primary contents of payload.
- optional bytes body = 2;
+ bytes body = 2;
}
// Unary request.
message SimpleRequest {
// Desired payload type in the response from the server.
// If response_type is RANDOM, server randomly chooses one from other formats.
- optional PayloadType response_type = 1;
+ PayloadType response_type = 1;
// Desired payload size in the response from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
- optional int32 response_size = 2;
+ int32 response_size = 2;
// Optional input payload sent along with the request.
- optional Payload payload = 3;
+ Payload payload = 3;
// Whether SimpleResponse should include username.
- optional bool fill_username = 4;
+ bool fill_username = 4;
// Whether SimpleResponse should include OAuth scope.
- optional bool fill_oauth_scope = 5;
+ bool fill_oauth_scope = 5;
}
// Unary response, as configured by the request.
message SimpleResponse {
// Payload to increase message size.
- optional Payload payload = 1;
+ Payload payload = 1;
// The user the request came from, for verifying authentication was
// successful when the client expected it.
- optional string username = 2;
+ string username = 2;
// OAuth scope.
- optional string oauth_scope = 3;
+ string oauth_scope = 3;
}
message SimpleContext {
- optional string value = 1;
+ string value = 1;
}
// Client-streaming request.
message StreamingInputCallRequest {
// Optional input payload sent along with the request.
- optional Payload payload = 1;
+ Payload payload = 1;
// Not expecting any payload from the response.
}
@@ -102,18 +102,18 @@
// Client-streaming response.
message StreamingInputCallResponse {
// Aggregated size of payloads received from the client.
- optional int32 aggregated_payload_size = 1;
+ int32 aggregated_payload_size = 1;
}
// Configuration for a particular response.
message ResponseParameters {
// Desired payload sizes in responses from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
- optional int32 size = 1;
+ int32 size = 1;
// Desired interval between consecutive responses in the response stream in
// microseconds.
- optional int32 interval_us = 2;
+ int32 interval_us = 2;
}
// Server-streaming request.
@@ -122,17 +122,17 @@
// If response_type is RANDOM, the payload from each response in the stream
// might be of different types. This is to simulate a mixed type of payload
// stream.
- optional PayloadType response_type = 1;
+ PayloadType response_type = 1;
// Configuration for each expected response message.
repeated ResponseParameters response_parameters = 2;
// Optional input payload sent along with the request.
- optional Payload payload = 3;
+ Payload payload = 3;
}
// Server-streaming response, as configured by the request and parameters.
message StreamingOutputCallResponse {
// Payload to increase response size.
- optional Payload payload = 1;
-}
\ No newline at end of file
+ Payload payload = 1;
+}