http://git-wip-us.apache.org/repos/asf/calcite/blob/86610552/avatica/src/main/java/org/apache/calcite/avatica/proto/Common.java ---------------------------------------------------------------------- diff --git a/avatica/src/main/java/org/apache/calcite/avatica/proto/Common.java b/avatica/src/main/java/org/apache/calcite/avatica/proto/Common.java index f66f493..c63355d 100644 --- a/avatica/src/main/java/org/apache/calcite/avatica/proto/Common.java +++ b/avatica/src/main/java/org/apache/calcite/avatica/proto/Common.java @@ -164,8 +164,8 @@ package org.apache.calcite.avatica.proto; internalGetValueMap() { return internalValueMap; } - private static com.google.protobuf.Internal.EnumLiteMap<StatementType> - internalValueMap = + private static final com.google.protobuf.Internal.EnumLiteMap< + StatementType> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<StatementType>() { public StatementType findValueByNumber(int number) { return StatementType.valueOf(number); @@ -481,8 +481,8 @@ package org.apache.calcite.avatica.proto; internalGetValueMap() { return internalValueMap; } - private static com.google.protobuf.Internal.EnumLiteMap<Rep> - internalValueMap = + private static final com.google.protobuf.Internal.EnumLiteMap< + Rep> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<Rep>() { public Rep findValueByNumber(int number) { return Rep.valueOf(number); @@ -596,8 +596,8 @@ package org.apache.calcite.avatica.proto; internalGetValueMap() { return internalValueMap; } - private static com.google.protobuf.Internal.EnumLiteMap<Severity> - internalValueMap = + private static final com.google.protobuf.Internal.EnumLiteMap< + Severity> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<Severity>() { public Severity findValueByNumber(int number) { return Severity.valueOf(number); @@ -716,7 +716,7 @@ package org.apache.calcite.avatica.proto; // @@protoc_insertion_point(message_implements:ConnectionProperties) ConnectionPropertiesOrBuilder { // Use ConnectionProperties.newBuilder() to construct. - private ConnectionProperties(com.google.protobuf.GeneratedMessage.Builder builder) { + private ConnectionProperties(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); } private ConnectionProperties() { @@ -737,8 +737,7 @@ package org.apache.calcite.avatica.proto; } private ConnectionProperties( 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 { @@ -776,15 +775,15 @@ package org.apache.calcite.avatica.proto; break; } case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - catalog_ = bs; + catalog_ = s; break; } case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - schema_ = bs; + schema_ = s; break; } case 56: { @@ -800,10 +799,11 @@ package org.apache.calcite.avatica.proto; } } } 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(); } @@ -820,21 +820,6 @@ package org.apache.calcite.avatica.proto; org.apache.calcite.avatica.proto.Common.ConnectionProperties.class, org.apache.calcite.avatica.proto.Common.ConnectionProperties.Builder.class); } - public static final com.google.protobuf.Parser<ConnectionProperties> PARSER = - new com.google.protobuf.AbstractParser<ConnectionProperties>() { - public ConnectionProperties parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ConnectionProperties(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser<ConnectionProperties> getParserForType() { - return PARSER; - } - public static final int IS_DIRTY_FIELD_NUMBER = 1; private boolean isDirty_; /** @@ -898,7 +883,7 @@ package org.apache.calcite.avatica.proto; } public static final int CATALOG_FIELD_NUMBER = 5; - private java.lang.Object catalog_; + private volatile java.lang.Object catalog_; /** * <code>optional string catalog = 5;</code> */ @@ -910,9 +895,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - catalog_ = s; - } + catalog_ = s; return s; } } @@ -934,7 +917,7 @@ package org.apache.calcite.avatica.proto; } public static final int SCHEMA_FIELD_NUMBER = 6; - private java.lang.Object schema_; + private volatile java.lang.Object schema_; /** * <code>optional string schema = 6;</code> */ @@ -946,9 +929,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - schema_ = s; - } + schema_ = s; return s; } } @@ -981,7 +962,6 @@ package org.apache.calcite.avatica.proto; public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (isDirty_ != false) { output.writeBool(1, isDirty_); } @@ -995,10 +975,10 @@ package org.apache.calcite.avatica.proto; output.writeUInt32(4, transactionIsolation_); } if (!getCatalogBytes().isEmpty()) { - output.writeBytes(5, getCatalogBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 5, catalog_); } if (!getSchemaBytes().isEmpty()) { - output.writeBytes(6, getSchemaBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 6, schema_); } if (hasAutoCommit_ != false) { output.writeBool(7, hasAutoCommit_); @@ -1008,9 +988,8 @@ package org.apache.calcite.avatica.proto; } } - private int memoizedSerializedSize = -1; public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; @@ -1031,12 +1010,10 @@ package org.apache.calcite.avatica.proto; .computeUInt32Size(4, transactionIsolation_); } if (!getCatalogBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getCatalogBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, catalog_); } if (!getSchemaBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, getSchemaBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, schema_); } if (hasAutoCommit_ != false) { size += com.google.protobuf.CodedOutputStream @@ -1046,7 +1023,7 @@ package org.apache.calcite.avatica.proto; size += com.google.protobuf.CodedOutputStream .computeBoolSize(8, hasReadOnly_); } - memoizedSerializedSize = size; + memoizedSize = size; return size; } @@ -1104,12 +1081,17 @@ package org.apache.calcite.avatica.proto; return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return new Builder(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.apache.calcite.avatica.proto.Common.ConnectionProperties prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -1459,9 +1441,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - catalog_ = s; - } + catalog_ = s; return s; } else { return (java.lang.String) ref; @@ -1513,7 +1493,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + catalog_ = value; onChanged(); return this; @@ -1529,9 +1510,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - schema_ = s; - } + schema_ = s; return s; } else { return (java.lang.String) ref; @@ -1583,7 +1562,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + schema_ = value; onChanged(); return this; @@ -1603,16 +1583,45 @@ package org.apache.calcite.avatica.proto; } // @@protoc_insertion_point(class_scope:ConnectionProperties) - private static final org.apache.calcite.avatica.proto.Common.ConnectionProperties defaultInstance;static { - defaultInstance = new org.apache.calcite.avatica.proto.Common.ConnectionProperties(); + private static final org.apache.calcite.avatica.proto.Common.ConnectionProperties DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Common.ConnectionProperties(); } public static org.apache.calcite.avatica.proto.Common.ConnectionProperties getDefaultInstance() { - return defaultInstance; + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<ConnectionProperties> + PARSER = new com.google.protobuf.AbstractParser<ConnectionProperties>() { + public ConnectionProperties parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ConnectionProperties(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser<ConnectionProperties> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<ConnectionProperties> getParserForType() { + return PARSER; } public org.apache.calcite.avatica.proto.Common.ConnectionProperties getDefaultInstanceForType() { - return defaultInstance; + return DEFAULT_INSTANCE; } } @@ -1661,7 +1670,7 @@ package org.apache.calcite.avatica.proto; // @@protoc_insertion_point(message_implements:StatementHandle) StatementHandleOrBuilder { // Use StatementHandle.newBuilder() to construct. - private StatementHandle(com.google.protobuf.GeneratedMessage.Builder builder) { + private StatementHandle(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); } private StatementHandle() { @@ -1676,8 +1685,7 @@ package org.apache.calcite.avatica.proto; } private StatementHandle( 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 { @@ -1695,9 +1703,9 @@ package org.apache.calcite.avatica.proto; break; } case 10: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - connectionId_ = bs; + connectionId_ = s; break; } case 16: { @@ -1710,7 +1718,7 @@ package org.apache.calcite.avatica.proto; if (signature_ != null) { subBuilder = signature_.toBuilder(); } - signature_ = input.readMessage(org.apache.calcite.avatica.proto.Common.Signature.PARSER, extensionRegistry); + signature_ = input.readMessage(org.apache.calcite.avatica.proto.Common.Signature.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(signature_); signature_ = subBuilder.buildPartial(); @@ -1721,10 +1729,11 @@ package org.apache.calcite.avatica.proto; } } } 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(); } @@ -1741,23 +1750,8 @@ package org.apache.calcite.avatica.proto; org.apache.calcite.avatica.proto.Common.StatementHandle.class, org.apache.calcite.avatica.proto.Common.StatementHandle.Builder.class); } - public static final com.google.protobuf.Parser<StatementHandle> PARSER = - new com.google.protobuf.AbstractParser<StatementHandle>() { - public StatementHandle parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new StatementHandle(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser<StatementHandle> getParserForType() { - return PARSER; - } - public static final int CONNECTION_ID_FIELD_NUMBER = 1; - private java.lang.Object connectionId_; + private volatile java.lang.Object connectionId_; /** * <code>optional string connection_id = 1;</code> */ @@ -1769,9 +1763,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - connectionId_ = s; - } + connectionId_ = s; return s; } } @@ -1834,9 +1826,8 @@ package org.apache.calcite.avatica.proto; public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (!getConnectionIdBytes().isEmpty()) { - output.writeBytes(1, getConnectionIdBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 1, connectionId_); } if (id_ != 0) { output.writeUInt32(2, id_); @@ -1846,15 +1837,13 @@ package org.apache.calcite.avatica.proto; } } - private int memoizedSerializedSize = -1; public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; if (!getConnectionIdBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getConnectionIdBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(1, connectionId_); } if (id_ != 0) { size += com.google.protobuf.CodedOutputStream @@ -1864,7 +1853,7 @@ package org.apache.calcite.avatica.proto; size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, getSignature()); } - memoizedSerializedSize = size; + memoizedSize = size; return size; } @@ -1922,12 +1911,17 @@ package org.apache.calcite.avatica.proto; return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return new Builder(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.apache.calcite.avatica.proto.Common.StatementHandle prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -2074,9 +2068,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - connectionId_ = s; - } + connectionId_ = s; return s; } else { return (java.lang.String) ref; @@ -2128,7 +2120,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + connectionId_ = value; onChanged(); return this; @@ -2291,16 +2284,45 @@ package org.apache.calcite.avatica.proto; } // @@protoc_insertion_point(class_scope:StatementHandle) - private static final org.apache.calcite.avatica.proto.Common.StatementHandle defaultInstance;static { - defaultInstance = new org.apache.calcite.avatica.proto.Common.StatementHandle(); + private static final org.apache.calcite.avatica.proto.Common.StatementHandle DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Common.StatementHandle(); } public static org.apache.calcite.avatica.proto.Common.StatementHandle getDefaultInstance() { - return defaultInstance; + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<StatementHandle> + PARSER = new com.google.protobuf.AbstractParser<StatementHandle>() { + public StatementHandle parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new StatementHandle(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser<StatementHandle> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<StatementHandle> getParserForType() { + return PARSER; } public org.apache.calcite.avatica.proto.Common.StatementHandle getDefaultInstanceForType() { - return defaultInstance; + return DEFAULT_INSTANCE; } } @@ -2401,7 +2423,7 @@ package org.apache.calcite.avatica.proto; // @@protoc_insertion_point(message_implements:Signature) SignatureOrBuilder { // Use Signature.newBuilder() to construct. - private Signature(com.google.protobuf.GeneratedMessage.Builder builder) { + private Signature(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); } private Signature() { @@ -2418,8 +2440,7 @@ package org.apache.calcite.avatica.proto; } private Signature( 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 { @@ -2441,13 +2462,13 @@ package org.apache.calcite.avatica.proto; columns_ = new java.util.ArrayList<org.apache.calcite.avatica.proto.Common.ColumnMetaData>(); mutable_bitField0_ |= 0x00000001; } - columns_.add(input.readMessage(org.apache.calcite.avatica.proto.Common.ColumnMetaData.PARSER, extensionRegistry)); + columns_.add(input.readMessage(org.apache.calcite.avatica.proto.Common.ColumnMetaData.parser(), extensionRegistry)); break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - sql_ = bs; + sql_ = s; break; } case 26: { @@ -2455,7 +2476,7 @@ package org.apache.calcite.avatica.proto; parameters_ = new java.util.ArrayList<org.apache.calcite.avatica.proto.Common.AvaticaParameter>(); mutable_bitField0_ |= 0x00000004; } - parameters_.add(input.readMessage(org.apache.calcite.avatica.proto.Common.AvaticaParameter.PARSER, extensionRegistry)); + parameters_.add(input.readMessage(org.apache.calcite.avatica.proto.Common.AvaticaParameter.parser(), extensionRegistry)); break; } case 34: { @@ -2463,7 +2484,7 @@ package org.apache.calcite.avatica.proto; if (cursorFactory_ != null) { subBuilder = cursorFactory_.toBuilder(); } - cursorFactory_ = input.readMessage(org.apache.calcite.avatica.proto.Common.CursorFactory.PARSER, extensionRegistry); + cursorFactory_ = input.readMessage(org.apache.calcite.avatica.proto.Common.CursorFactory.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(cursorFactory_); cursorFactory_ = subBuilder.buildPartial(); @@ -2480,10 +2501,11 @@ package org.apache.calcite.avatica.proto; } } } 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)) { columns_ = java.util.Collections.unmodifiableList(columns_); @@ -2506,21 +2528,6 @@ package org.apache.calcite.avatica.proto; org.apache.calcite.avatica.proto.Common.Signature.class, org.apache.calcite.avatica.proto.Common.Signature.Builder.class); } - public static final com.google.protobuf.Parser<Signature> PARSER = - new com.google.protobuf.AbstractParser<Signature>() { - public Signature parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Signature(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser<Signature> getParserForType() { - return PARSER; - } - private int bitField0_; public static final int COLUMNS_FIELD_NUMBER = 1; private java.util.List<org.apache.calcite.avatica.proto.Common.ColumnMetaData> columns_; @@ -2558,7 +2565,7 @@ package org.apache.calcite.avatica.proto; } public static final int SQL_FIELD_NUMBER = 2; - private java.lang.Object sql_; + private volatile java.lang.Object sql_; /** * <code>optional string sql = 2;</code> */ @@ -2570,9 +2577,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - sql_ = s; - } + sql_ = s; return s; } } @@ -2677,12 +2682,11 @@ package org.apache.calcite.avatica.proto; public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); for (int i = 0; i < columns_.size(); i++) { output.writeMessage(1, columns_.get(i)); } if (!getSqlBytes().isEmpty()) { - output.writeBytes(2, getSqlBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 2, sql_); } for (int i = 0; i < parameters_.size(); i++) { output.writeMessage(3, parameters_.get(i)); @@ -2695,9 +2699,8 @@ package org.apache.calcite.avatica.proto; } } - private int memoizedSerializedSize = -1; public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; @@ -2706,8 +2709,7 @@ package org.apache.calcite.avatica.proto; .computeMessageSize(1, columns_.get(i)); } if (!getSqlBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getSqlBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sql_); } for (int i = 0; i < parameters_.size(); i++) { size += com.google.protobuf.CodedOutputStream @@ -2721,7 +2723,7 @@ package org.apache.calcite.avatica.proto; size += com.google.protobuf.CodedOutputStream .computeEnumSize(5, statementType_); } - memoizedSerializedSize = size; + memoizedSize = size; return size; } @@ -2779,12 +2781,17 @@ package org.apache.calcite.avatica.proto; return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return new Builder(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.apache.calcite.avatica.proto.Common.Signature prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -3259,9 +3266,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - sql_ = s; - } + sql_ = s; return s; } else { return (java.lang.String) ref; @@ -3313,7 +3318,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + sql_ = value; onChanged(); return this; @@ -3734,16 +3740,45 @@ package org.apache.calcite.avatica.proto; } // @@protoc_insertion_point(class_scope:Signature) - private static final org.apache.calcite.avatica.proto.Common.Signature defaultInstance;static { - defaultInstance = new org.apache.calcite.avatica.proto.Common.Signature(); + private static final org.apache.calcite.avatica.proto.Common.Signature DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Common.Signature(); } public static org.apache.calcite.avatica.proto.Common.Signature getDefaultInstance() { - return defaultInstance; + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<Signature> + PARSER = new com.google.protobuf.AbstractParser<Signature>() { + public Signature parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Signature(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser<Signature> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<Signature> getParserForType() { + return PARSER; } public org.apache.calcite.avatica.proto.Common.Signature getDefaultInstanceForType() { - return defaultInstance; + return DEFAULT_INSTANCE; } } @@ -3898,7 +3933,7 @@ package org.apache.calcite.avatica.proto; // @@protoc_insertion_point(message_implements:ColumnMetaData) ColumnMetaDataOrBuilder { // Use ColumnMetaData.newBuilder() to construct. - private ColumnMetaData(com.google.protobuf.GeneratedMessage.Builder builder) { + private ColumnMetaData(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); } private ColumnMetaData() { @@ -3930,8 +3965,7 @@ package org.apache.calcite.avatica.proto; } private ColumnMetaData( 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 { @@ -3989,21 +4023,21 @@ package org.apache.calcite.avatica.proto; break; } case 74: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - label_ = bs; + label_ = s; break; } case 82: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - columnName_ = bs; + columnName_ = s; break; } case 90: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - schemaName_ = bs; + schemaName_ = s; break; } case 96: { @@ -4017,15 +4051,15 @@ package org.apache.calcite.avatica.proto; break; } case 114: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - tableName_ = bs; + tableName_ = s; break; } case 122: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - catalogName_ = bs; + catalogName_ = s; break; } case 128: { @@ -4044,9 +4078,9 @@ package org.apache.calcite.avatica.proto; break; } case 154: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - columnClassName_ = bs; + columnClassName_ = s; break; } case 162: { @@ -4054,7 +4088,7 @@ package org.apache.calcite.avatica.proto; if (type_ != null) { subBuilder = type_.toBuilder(); } - type_ = input.readMessage(org.apache.calcite.avatica.proto.Common.AvaticaType.PARSER, extensionRegistry); + type_ = input.readMessage(org.apache.calcite.avatica.proto.Common.AvaticaType.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(type_); type_ = subBuilder.buildPartial(); @@ -4065,10 +4099,11 @@ package org.apache.calcite.avatica.proto; } } } 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(); } @@ -4085,21 +4120,6 @@ package org.apache.calcite.avatica.proto; org.apache.calcite.avatica.proto.Common.ColumnMetaData.class, org.apache.calcite.avatica.proto.Common.ColumnMetaData.Builder.class); } - public static final com.google.protobuf.Parser<ColumnMetaData> PARSER = - new com.google.protobuf.AbstractParser<ColumnMetaData>() { - public ColumnMetaData parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ColumnMetaData(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser<ColumnMetaData> getParserForType() { - return PARSER; - } - public static final int ORDINAL_FIELD_NUMBER = 1; private int ordinal_; /** @@ -4173,7 +4193,7 @@ package org.apache.calcite.avatica.proto; } public static final int LABEL_FIELD_NUMBER = 9; - private java.lang.Object label_; + private volatile java.lang.Object label_; /** * <code>optional string label = 9;</code> */ @@ -4185,9 +4205,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - label_ = s; - } + label_ = s; return s; } } @@ -4209,7 +4227,7 @@ package org.apache.calcite.avatica.proto; } public static final int COLUMN_NAME_FIELD_NUMBER = 10; - private java.lang.Object columnName_; + private volatile java.lang.Object columnName_; /** * <code>optional string column_name = 10;</code> */ @@ -4221,9 +4239,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - columnName_ = s; - } + columnName_ = s; return s; } } @@ -4245,7 +4261,7 @@ package org.apache.calcite.avatica.proto; } public static final int SCHEMA_NAME_FIELD_NUMBER = 11; - private java.lang.Object schemaName_; + private volatile java.lang.Object schemaName_; /** * <code>optional string schema_name = 11;</code> */ @@ -4257,9 +4273,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - schemaName_ = s; - } + schemaName_ = s; return s; } } @@ -4299,7 +4313,7 @@ package org.apache.calcite.avatica.proto; } public static final int TABLE_NAME_FIELD_NUMBER = 14; - private java.lang.Object tableName_; + private volatile java.lang.Object tableName_; /** * <code>optional string table_name = 14;</code> */ @@ -4311,9 +4325,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - tableName_ = s; - } + tableName_ = s; return s; } } @@ -4335,7 +4347,7 @@ package org.apache.calcite.avatica.proto; } public static final int CATALOG_NAME_FIELD_NUMBER = 15; - private java.lang.Object catalogName_; + private volatile java.lang.Object catalogName_; /** * <code>optional string catalog_name = 15;</code> */ @@ -4347,9 +4359,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - catalogName_ = s; - } + catalogName_ = s; return s; } } @@ -4398,7 +4408,7 @@ package org.apache.calcite.avatica.proto; } public static final int COLUMN_CLASS_NAME_FIELD_NUMBER = 19; - private java.lang.Object columnClassName_; + private volatile java.lang.Object columnClassName_; /** * <code>optional string column_class_name = 19;</code> */ @@ -4410,9 +4420,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - columnClassName_ = s; - } + columnClassName_ = s; return s; } } @@ -4466,7 +4474,6 @@ package org.apache.calcite.avatica.proto; public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (ordinal_ != 0) { output.writeUInt32(1, ordinal_); } @@ -4492,13 +4499,13 @@ package org.apache.calcite.avatica.proto; output.writeUInt32(8, displaySize_); } if (!getLabelBytes().isEmpty()) { - output.writeBytes(9, getLabelBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 9, label_); } if (!getColumnNameBytes().isEmpty()) { - output.writeBytes(10, getColumnNameBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 10, columnName_); } if (!getSchemaNameBytes().isEmpty()) { - output.writeBytes(11, getSchemaNameBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 11, schemaName_); } if (precision_ != 0) { output.writeUInt32(12, precision_); @@ -4507,10 +4514,10 @@ package org.apache.calcite.avatica.proto; output.writeUInt32(13, scale_); } if (!getTableNameBytes().isEmpty()) { - output.writeBytes(14, getTableNameBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 14, tableName_); } if (!getCatalogNameBytes().isEmpty()) { - output.writeBytes(15, getCatalogNameBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 15, catalogName_); } if (readOnly_ != false) { output.writeBool(16, readOnly_); @@ -4522,16 +4529,15 @@ package org.apache.calcite.avatica.proto; output.writeBool(18, definitelyWritable_); } if (!getColumnClassNameBytes().isEmpty()) { - output.writeBytes(19, getColumnClassNameBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 19, columnClassName_); } if (type_ != null) { output.writeMessage(20, getType()); } } - private int memoizedSerializedSize = -1; public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; @@ -4568,16 +4574,13 @@ package org.apache.calcite.avatica.proto; .computeUInt32Size(8, displaySize_); } if (!getLabelBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(9, getLabelBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(9, label_); } if (!getColumnNameBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(10, getColumnNameBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(10, columnName_); } if (!getSchemaNameBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(11, getSchemaNameBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(11, schemaName_); } if (precision_ != 0) { size += com.google.protobuf.CodedOutputStream @@ -4588,12 +4591,10 @@ package org.apache.calcite.avatica.proto; .computeUInt32Size(13, scale_); } if (!getTableNameBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(14, getTableNameBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(14, tableName_); } if (!getCatalogNameBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(15, getCatalogNameBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(15, catalogName_); } if (readOnly_ != false) { size += com.google.protobuf.CodedOutputStream @@ -4608,14 +4609,13 @@ package org.apache.calcite.avatica.proto; .computeBoolSize(18, definitelyWritable_); } if (!getColumnClassNameBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(19, getColumnClassNameBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(19, columnClassName_); } if (type_ != null) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(20, getType()); } - memoizedSerializedSize = size; + memoizedSize = size; return size; } @@ -4673,12 +4673,17 @@ package org.apache.calcite.avatica.proto; return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return new Builder(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.apache.calcite.avatica.proto.Common.ColumnMetaData prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -5136,9 +5141,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - label_ = s; - } + label_ = s; return s; } else { return (java.lang.String) ref; @@ -5190,7 +5193,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + label_ = value; onChanged(); return this; @@ -5206,9 +5210,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - columnName_ = s; - } + columnName_ = s; return s; } else { return (java.lang.String) ref; @@ -5260,7 +5262,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + columnName_ = value; onChanged(); return this; @@ -5276,9 +5279,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - schemaName_ = s; - } + schemaName_ = s; return s; } else { return (java.lang.String) ref; @@ -5330,7 +5331,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + schemaName_ = value; onChanged(); return this; @@ -5398,9 +5400,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - tableName_ = s; - } + tableName_ = s; return s; } else { return (java.lang.String) ref; @@ -5452,7 +5452,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + tableName_ = value; onChanged(); return this; @@ -5468,9 +5469,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - catalogName_ = s; - } + catalogName_ = s; return s; } else { return (java.lang.String) ref; @@ -5522,7 +5521,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + catalogName_ = value; onChanged(); return this; @@ -5616,9 +5616,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - columnClassName_ = s; - } + columnClassName_ = s; return s; } else { return (java.lang.String) ref; @@ -5670,7 +5668,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + columnClassName_ = value; onChanged(); return this; @@ -5807,16 +5806,45 @@ package org.apache.calcite.avatica.proto; } // @@protoc_insertion_point(class_scope:ColumnMetaData) - private static final org.apache.calcite.avatica.proto.Common.ColumnMetaData defaultInstance;static { - defaultInstance = new org.apache.calcite.avatica.proto.Common.ColumnMetaData(); + private static final org.apache.calcite.avatica.proto.Common.ColumnMetaData DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Common.ColumnMetaData(); } public static org.apache.calcite.avatica.proto.Common.ColumnMetaData getDefaultInstance() { - return defaultInstance; + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<ColumnMetaData> + PARSER = new com.google.protobuf.AbstractParser<ColumnMetaData>() { + public ColumnMetaData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new ColumnMetaData(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser<ColumnMetaData> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<ColumnMetaData> getParserForType() { + return PARSER; } public org.apache.calcite.avatica.proto.Common.ColumnMetaData getDefaultInstanceForType() { - return defaultInstance; + return DEFAULT_INSTANCE; } } @@ -5930,7 +5958,7 @@ package org.apache.calcite.avatica.proto; // @@protoc_insertion_point(message_implements:AvaticaType) AvaticaTypeOrBuilder { // Use AvaticaType.newBuilder() to construct. - private AvaticaType(com.google.protobuf.GeneratedMessage.Builder builder) { + private AvaticaType(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); } private AvaticaType() { @@ -5947,8 +5975,7 @@ package org.apache.calcite.avatica.proto; } private AvaticaType( 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 { @@ -5971,9 +5998,9 @@ package org.apache.calcite.avatica.proto; break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - name_ = bs; + name_ = s; break; } case 24: { @@ -5987,7 +6014,7 @@ package org.apache.calcite.avatica.proto; columns_ = new java.util.ArrayList<org.apache.calcite.avatica.proto.Common.ColumnMetaData>(); mutable_bitField0_ |= 0x00000008; } - columns_.add(input.readMessage(org.apache.calcite.avatica.proto.Common.ColumnMetaData.PARSER, extensionRegistry)); + columns_.add(input.readMessage(org.apache.calcite.avatica.proto.Common.ColumnMetaData.parser(), extensionRegistry)); break; } case 42: { @@ -5995,7 +6022,7 @@ package org.apache.calcite.avatica.proto; if (component_ != null) { subBuilder = component_.toBuilder(); } - component_ = input.readMessage(org.apache.calcite.avatica.proto.Common.AvaticaType.PARSER, extensionRegistry); + component_ = input.readMessage(org.apache.calcite.avatica.proto.Common.AvaticaType.parser(), extensionRegistry); if (subBuilder != null) { subBuilder.mergeFrom(component_); component_ = subBuilder.buildPartial(); @@ -6006,10 +6033,11 @@ package org.apache.calcite.avatica.proto; } } } 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_ & 0x00000008) == 0x00000008)) { columns_ = java.util.Collections.unmodifiableList(columns_); @@ -6029,21 +6057,6 @@ package org.apache.calcite.avatica.proto; org.apache.calcite.avatica.proto.Common.AvaticaType.class, org.apache.calcite.avatica.proto.Common.AvaticaType.Builder.class); } - public static final com.google.protobuf.Parser<AvaticaType> PARSER = - new com.google.protobuf.AbstractParser<AvaticaType>() { - public AvaticaType parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AvaticaType(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser<AvaticaType> getParserForType() { - return PARSER; - } - private int bitField0_; public static final int ID_FIELD_NUMBER = 1; private int id_; @@ -6055,7 +6068,7 @@ package org.apache.calcite.avatica.proto; } public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * <code>optional string name = 2;</code> */ @@ -6067,9 +6080,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } + name_ = s; return s; } } @@ -6206,12 +6217,11 @@ package org.apache.calcite.avatica.proto; public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (id_ != 0) { output.writeUInt32(1, id_); } if (!getNameBytes().isEmpty()) { - output.writeBytes(2, getNameBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 2, name_); } if (rep_ != org.apache.calcite.avatica.proto.Common.Rep.PRIMITIVE_BOOLEAN.getNumber()) { output.writeEnum(3, rep_); @@ -6224,9 +6234,8 @@ package org.apache.calcite.avatica.proto; } } - private int memoizedSerializedSize = -1; public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; @@ -6235,8 +6244,7 @@ package org.apache.calcite.avatica.proto; .computeUInt32Size(1, id_); } if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNameBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, name_); } if (rep_ != org.apache.calcite.avatica.proto.Common.Rep.PRIMITIVE_BOOLEAN.getNumber()) { size += com.google.protobuf.CodedOutputStream @@ -6250,7 +6258,7 @@ package org.apache.calcite.avatica.proto; size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getComponent()); } - memoizedSerializedSize = size; + memoizedSize = size; return size; } @@ -6308,12 +6316,17 @@ package org.apache.calcite.avatica.proto; return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return new Builder(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.apache.calcite.avatica.proto.Common.AvaticaType prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -6538,9 +6551,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } + name_ = s; return s; } else { return (java.lang.String) ref; @@ -6592,7 +6603,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; @@ -7121,16 +7133,45 @@ package org.apache.calcite.avatica.proto; } // @@protoc_insertion_point(class_scope:AvaticaType) - private static final org.apache.calcite.avatica.proto.Common.AvaticaType defaultInstance;static { - defaultInstance = new org.apache.calcite.avatica.proto.Common.AvaticaType(); + private static final org.apache.calcite.avatica.proto.Common.AvaticaType DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Common.AvaticaType(); } public static org.apache.calcite.avatica.proto.Common.AvaticaType getDefaultInstance() { - return defaultInstance; + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<AvaticaType> + PARSER = new com.google.protobuf.AbstractParser<AvaticaType>() { + public AvaticaType parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new AvaticaType(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser<AvaticaType> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<AvaticaType> getParserForType() { + return PARSER; } public org.apache.calcite.avatica.proto.Common.AvaticaType getDefaultInstanceForType() { - return defaultInstance; + return DEFAULT_INSTANCE; } } @@ -7201,7 +7242,7 @@ package org.apache.calcite.avatica.proto; // @@protoc_insertion_point(message_implements:AvaticaParameter) AvaticaParameterOrBuilder { // Use AvaticaParameter.newBuilder() to construct. - private AvaticaParameter(com.google.protobuf.GeneratedMessage.Builder builder) { + private AvaticaParameter(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); } private AvaticaParameter() { @@ -7221,8 +7262,7 @@ package org.apache.calcite.avatica.proto; } private AvaticaParameter( 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 { @@ -7260,30 +7300,31 @@ package org.apache.calcite.avatica.proto; break; } case 42: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - typeName_ = bs; + typeName_ = s; break; } case 50: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - className_ = bs; + className_ = s; break; } case 58: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - name_ = bs; + name_ = s; break; } } } } 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(); } @@ -7300,21 +7341,6 @@ package org.apache.calcite.avatica.proto; org.apache.calcite.avatica.proto.Common.AvaticaParameter.class, org.apache.calcite.avatica.proto.Common.AvaticaParameter.Builder.class); } - public static final com.google.protobuf.Parser<AvaticaParameter> PARSER = - new com.google.protobuf.AbstractParser<AvaticaParameter>() { - public AvaticaParameter parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new AvaticaParameter(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser<AvaticaParameter> getParserForType() { - return PARSER; - } - public static final int SIGNED_FIELD_NUMBER = 1; private boolean signed_; /** @@ -7352,7 +7378,7 @@ package org.apache.calcite.avatica.proto; } public static final int TYPE_NAME_FIELD_NUMBER = 5; - private java.lang.Object typeName_; + private volatile java.lang.Object typeName_; /** * <code>optional string type_name = 5;</code> */ @@ -7364,9 +7390,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - typeName_ = s; - } + typeName_ = s; return s; } } @@ -7388,7 +7412,7 @@ package org.apache.calcite.avatica.proto; } public static final int CLASS_NAME_FIELD_NUMBER = 6; - private java.lang.Object className_; + private volatile java.lang.Object className_; /** * <code>optional string class_name = 6;</code> */ @@ -7400,9 +7424,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - className_ = s; - } + className_ = s; return s; } } @@ -7424,7 +7446,7 @@ package org.apache.calcite.avatica.proto; } public static final int NAME_FIELD_NUMBER = 7; - private java.lang.Object name_; + private volatile java.lang.Object name_; /** * <code>optional string name = 7;</code> */ @@ -7436,9 +7458,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } + name_ = s; return s; } } @@ -7471,7 +7491,6 @@ package org.apache.calcite.avatica.proto; public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (signed_ != false) { output.writeBool(1, signed_); } @@ -7485,19 +7504,18 @@ package org.apache.calcite.avatica.proto; output.writeUInt32(4, parameterType_); } if (!getTypeNameBytes().isEmpty()) { - output.writeBytes(5, getTypeNameBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 5, typeName_); } if (!getClassNameBytes().isEmpty()) { - output.writeBytes(6, getClassNameBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 6, className_); } if (!getNameBytes().isEmpty()) { - output.writeBytes(7, getNameBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 7, name_); } } - private int memoizedSerializedSize = -1; public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; @@ -7518,18 +7536,15 @@ package org.apache.calcite.avatica.proto; .computeUInt32Size(4, parameterType_); } if (!getTypeNameBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getTypeNameBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(5, typeName_); } if (!getClassNameBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, getClassNameBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(6, className_); } if (!getNameBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, getNameBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(7, name_); } - memoizedSerializedSize = size; + memoizedSize = size; return size; } @@ -7587,12 +7602,17 @@ package org.apache.calcite.avatica.proto; return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return new Builder(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.apache.calcite.avatica.proto.Common.AvaticaParameter prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -7861,9 +7881,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - typeName_ = s; - } + typeName_ = s; return s; } else { return (java.lang.String) ref; @@ -7915,7 +7933,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + typeName_ = value; onChanged(); return this; @@ -7931,9 +7950,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - className_ = s; - } + className_ = s; return s; } else { return (java.lang.String) ref; @@ -7985,7 +8002,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + className_ = value; onChanged(); return this; @@ -8001,9 +8019,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - name_ = s; - } + name_ = s; return s; } else { return (java.lang.String) ref; @@ -8055,7 +8071,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + name_ = value; onChanged(); return this; @@ -8075,16 +8092,45 @@ package org.apache.calcite.avatica.proto; } // @@protoc_insertion_point(class_scope:AvaticaParameter) - private static final org.apache.calcite.avatica.proto.Common.AvaticaParameter defaultInstance;static { - defaultInstance = new org.apache.calcite.avatica.proto.Common.AvaticaParameter(); + private static final org.apache.calcite.avatica.proto.Common.AvaticaParameter DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Common.AvaticaParameter(); } public static org.apache.calcite.avatica.proto.Common.AvaticaParameter getDefaultInstance() { - return defaultInstance; + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<AvaticaParameter> + PARSER = new com.google.protobuf.AbstractParser<AvaticaParameter>() { + public AvaticaParameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new AvaticaParameter(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser<AvaticaParameter> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<AvaticaParameter> getParserForType() { + return PARSER; } public org.apache.calcite.avatica.proto.Common.AvaticaParameter getDefaultInstanceForType() { - return defaultInstance; + return DEFAULT_INSTANCE; } } @@ -8143,7 +8189,7 @@ package org.apache.calcite.avatica.proto; // @@protoc_insertion_point(message_implements:CursorFactory) CursorFactoryOrBuilder { // Use CursorFactory.newBuilder() to construct. - private CursorFactory(com.google.protobuf.GeneratedMessage.Builder builder) { + private CursorFactory(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); } private CursorFactory() { @@ -8159,8 +8205,7 @@ package org.apache.calcite.avatica.proto; } private CursorFactory( 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 { @@ -8184,27 +8229,28 @@ package org.apache.calcite.avatica.proto; break; } case 18: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); - className_ = bs; + className_ = s; break; } case 26: { - com.google.protobuf.ByteString bs = input.readBytes(); + String s = input.readStringRequireUtf8(); if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { fieldNames_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000004; } - fieldNames_.add(bs); + fieldNames_.add(s); break; } } } } 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_ & 0x00000004) == 0x00000004)) { fieldNames_ = fieldNames_.getUnmodifiableView(); @@ -8224,21 +8270,6 @@ package org.apache.calcite.avatica.proto; org.apache.calcite.avatica.proto.Common.CursorFactory.class, org.apache.calcite.avatica.proto.Common.CursorFactory.Builder.class); } - public static final com.google.protobuf.Parser<CursorFactory> PARSER = - new com.google.protobuf.AbstractParser<CursorFactory>() { - public CursorFactory parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new CursorFactory(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser<CursorFactory> getParserForType() { - return PARSER; - } - /** * Protobuf enum {@code CursorFactory.Style} */ @@ -8321,8 +8352,8 @@ package org.apache.calcite.avatica.proto; internalGetValueMap() { return internalValueMap; } - private static com.google.protobuf.Internal.EnumLiteMap<Style> - internalValueMap = + private static final com.google.protobuf.Internal.EnumLiteMap< + Style> internalValueMap = new com.google.protobuf.Internal.EnumLiteMap<Style>() { public Style findValueByNumber(int number) { return Style.valueOf(number); @@ -8385,7 +8416,7 @@ package org.apache.calcite.avatica.proto; } public static final int CLASS_NAME_FIELD_NUMBER = 2; - private java.lang.Object className_; + private volatile java.lang.Object className_; /** * <code>optional string class_name = 2;</code> */ @@ -8397,9 +8428,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - className_ = s; - } + className_ = s; return s; } } @@ -8461,21 +8490,19 @@ package org.apache.calcite.avatica.proto; public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (style_ != org.apache.calcite.avatica.proto.Common.CursorFactory.Style.OBJECT.getNumber()) { output.writeEnum(1, style_); } if (!getClassNameBytes().isEmpty()) { - output.writeBytes(2, getClassNameBytes()); + com.google.protobuf.GeneratedMessage.writeString(output, 2, className_); } for (int i = 0; i < fieldNames_.size(); i++) { - output.writeBytes(3, fieldNames_.getByteString(i)); + com.google.protobuf.GeneratedMessage.writeString(output, 3, fieldNames_.getRaw(i)); } } - private int memoizedSerializedSize = -1; public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; @@ -8484,19 +8511,17 @@ package org.apache.calcite.avatica.proto; .computeEnumSize(1, style_); } if (!getClassNameBytes().isEmpty()) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getClassNameBytes()); + size += com.google.protobuf.GeneratedMessage.computeStringSize(2, className_); } { int dataSize = 0; for (int i = 0; i < fieldNames_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(fieldNames_.getByteString(i)); + dataSize += computeStringSizeNoTag(fieldNames_.getRaw(i)); } size += dataSize; size += 1 * getFieldNamesList().size(); } - memoizedSerializedSize = size; + memoizedSize = size; return size; } @@ -8554,12 +8579,17 @@ package org.apache.calcite.avatica.proto; return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return new Builder(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.apache.calcite.avatica.proto.Common.CursorFactory prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -8757,9 +8787,7 @@ package org.apache.calcite.avatica.proto; com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); - if (bs.isValidUtf8()) { - className_ = s; - } + className_ = s; return s; } else { return (java.lang.String) ref; @@ -8811,7 +8839,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - + checkByteStringIsUtf8(value); + className_ = value; onChanged(); return this; @@ -8904,7 +8933,8 @@ package org.apache.calcite.avatica.proto; if (value == null) { throw new NullPointerException(); } - ensureFieldNamesIsMutable(); + checkByteStringIsUtf8(value); + ensureFieldNamesIsMutable(); fieldNames_.add(value); onChanged(); return this; @@ -8924,16 +8954,45 @@ package org.apache.calcite.avatica.proto; } // @@protoc_insertion_point(class_scope:CursorFactory) - private static final org.apache.calcite.avatica.proto.Common.CursorFactory defaultInstance;static { - defaultInstance = new org.apache.calcite.avatica.proto.Common.CursorFactory(); + private static final org.apache.calcite.avatica.proto.Common.CursorFactory DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Common.CursorFactory(); } public static org.apache.calcite.avatica.proto.Common.CursorFactory getDefaultInstance() { - return defaultInstance; + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<CursorFactory> + PARSER = new com.google.protobuf.AbstractParser<CursorFactory>() { + public CursorFactory parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new CursorFactory(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; + + public static com.google.protobuf.Parser<CursorFactory> parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser<CursorFactory> getParserForType() { + return PARSER; } public org.apache.calcite.avatica.proto.Common.CursorFactory getDefaultInstanceForType() { - return defaultInstance; + return DEFAULT_INSTANCE; } } @@ -8988,7 +9047,7 @@ package org.apache.calcite.avatica.proto; // @@protoc_insertion_point(message_implements:Frame) FrameOrBuilder { // Use Frame.newBuilder() to construct. - private Frame(com.google.protobuf.GeneratedMessage.Builder builder) { + private Frame(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); } private Frame() { @@ -9004,8 +9063,7 @@ package org.apache.calcite.avatica.proto; } private Frame( 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 { @@ -9037,16 +9095,17 @@ package org.apache.calcite.avatica.proto; rows_ = new java.util.ArrayList<org.apache.calcite.avatica.proto.Common.Row>(); mutable_bitField0_ |= 0x00000004; } - rows_.add(input.readMessage(org.apache.calcite.avatica.proto.Common.Row.PARSER, extensionRegistry)); + rows_.add(input.readMessage(org.apache.calcite.avatica.proto.Common.Row.parser(), extensionRegistry)); break; } } } } 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_ & 0x00000004) == 0x00000004)) { rows_ = java.util.Collections.unmodifiableList(rows_); @@ -9066,21 +9125,6 @@ package org.apache.calcite.avatica.proto; org.apache.calcite.avatica.proto.Common.Frame.class, org.apache.calcite.avatica.proto.Common.Frame.Builder.class); } - public static final com.google.protobuf.Parser<Frame> PARSER = - new com.google.protobuf.AbstractParser<Frame>() { - public Frame parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new Frame(input, extensionRegistry); - } - }; - - @java.lang.Override - public com.google.protobuf.Parser<Frame> getParserForType() { - return PARSER; - } - private int bitField0_; public static final int OFFSET_FIELD_NUMBER = 1; private long offset_; @@ -9147,7 +9191,6 @@ package org.apache.calcite.avatica.proto; public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - getSerializedSize(); if (offset_ != 0L) { output.writeUInt64(1, offset_); } @@ -9159,9 +9202,8 @@ package org.apache.calcite.avatica.proto; } } - private int memoizedSerializedSize = -1; public int getSerializedSize() { - int size = memoizedSerializedSize; + int size = memoizedSize; if (size != -1) return size; size = 0; @@ -9177,7 +9219,7 @@ package org.apache.calcite.avatica.proto; size += com.google.protobuf.CodedOutputStream .computeMessageSize(3, rows_.get(i)); } - memoizedSerializedSize = size; + memoizedSize = size; return size; } @@ -9235,12 +9277,17 @@ package org.apache.calcite.avatica.proto; return PARSER.parseFrom(input, extensionRegistry); } - public static Builder newBuilder() { return new Builder(); } public Builder newBuilderForType() { return newBuilder(); } + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } public static Builder newBuilder(org.apache.calcite.avatica.proto.Common.Frame prototype) { - return newBuilder().mergeFrom(prototype); + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + public Builder toBuilder() { + return this == DEFAULT_INSTANCE + ? new Builder() : new Builder().mergeFrom(this); } - public Builder toBuilder() { return newBuilder(this); } @java.lang.Override protected Builder newBuilderForType( @@ -9714,16 +9761,45 @@ package org.apache.calcite.avatica.proto; } // @@protoc_insertion_point(class_scope:Frame) - private static final org.apache.calcite.avatica.proto.Common.Frame defaultInstance;static { - defaultInstance = new org.apache.calcite.avatica.proto.Common.Frame(); + private static final org.apache.calcite.avatica.proto.Common.Frame DEFAULT_INSTANCE; + static { + DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Common.Frame(); } public static org.apache.calcite.avatica.proto.Common.Frame getDefaultInstance() { - return defaultInstance; + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser<Frame> + PARSER = new com.google.protobuf.AbstractParser<Frame>() { + public Frame parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + try { + return new Frame(input, extensionRegistry); + } catch (RuntimeException e) { + if (e.getCause() instanceof + com.google.protobuf.InvalidProtocolBufferException) { + throw (com.google.protobuf.InvalidProtocolBufferException) + e.getCause(); + } + throw e; + } + } + }; +
<TRUNCATED>
