From f5cbc7d607dd3f5edd7f0a3568fd500f8eab13dd Mon Sep 17 00:00:00 2001 From: Adam Pocock Date: Fri, 25 Oct 2024 11:49:21 -0400 Subject: [PATCH] Bumping to jackson 2.18.0, jline3 3.27.1, protobuf-java 3.25.5, asm 9.7.1 (#72) * Bumping to jackson 2.18.0, jline3 3.27.1, protobuf-java 3.25.5, asm 9.7.1 * Updating github runners. * Splitting out Java 17 into a separate step. --- .github/workflows/maven-macos.yml | 13 + .github/workflows/maven-ubuntu.yml | 13 + .github/workflows/maven-windows.yml | 13 + README.md | 8 + THIRD_PARTY_LICENSES.txt | 76 ++- .../protobuf/protos/ComponentProto.java | 576 +++++++++--------- .../protos/ComponentProtoOrBuilder.java | 9 +- .../protobuf/protos/ConfigFileProto.java | 193 +++--- .../protos/ConfigFileProtoOrBuilder.java | 1 + .../config/protobuf/protos/ConfigProto.java | 304 +++++---- .../protobuf/protos/ConfigProtoOrBuilder.java | 9 +- .../protobuf/protos/ListProvenanceProto.java | 210 +++---- .../protos/ListProvenanceProtoOrBuilder.java | 1 + .../protobuf/protos/MapProvenanceProto.java | 216 +++---- .../protos/MapProvenanceProtoOrBuilder.java | 3 +- .../protos/ObjectProvenanceProto.java | 336 +++++----- .../ObjectProvenanceProtoOrBuilder.java | 3 +- .../config/protobuf/protos/OlcutProto.java | 3 +- .../protobuf/protos/PropertyListProto.java | 310 +++++----- .../protos/PropertyListProtoOrBuilder.java | 1 + .../protobuf/protos/PropertyMapProto.java | 246 ++++---- .../protos/PropertyMapProtoOrBuilder.java | 9 +- .../protobuf/protos/RootProvenanceProto.java | 242 ++++---- .../protos/RootProvenanceProtoOrBuilder.java | 1 + .../protos/SerializedObjectProto.java | 233 ++++--- .../SerializedObjectProtoOrBuilder.java | 1 + .../protos/SimpleProvenanceProto.java | 317 +++++----- .../SimpleProvenanceProtoOrBuilder.java | 1 + olcut-extras/pom.xml | 2 +- pom.xml | 10 +- 30 files changed, 1644 insertions(+), 1716 deletions(-) diff --git a/.github/workflows/maven-macos.yml b/.github/workflows/maven-macos.yml index 2d6cd012..aa3c9087 100644 --- a/.github/workflows/maven-macos.yml +++ b/.github/workflows/maven-macos.yml @@ -25,3 +25,16 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Maven run: mvn -B package --file pom.xml + build-17: + runs-on: macos-latest + name: OLCUT - macOS Java SE 17 + steps: + - uses: actions/checkout@v4 + - name: Setup Oracle Java SE + uses: oracle-actions/setup-java@v1.4.0 + with: + website: oracle.com + release: 17 + version: 17.0.12 + - name: Build with Java 17 + run: mvn -B package --file pom.xml diff --git a/.github/workflows/maven-ubuntu.yml b/.github/workflows/maven-ubuntu.yml index 531a43ae..8283ae49 100644 --- a/.github/workflows/maven-ubuntu.yml +++ b/.github/workflows/maven-ubuntu.yml @@ -25,3 +25,16 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Maven run: mvn -B package --file pom.xml + build-17: + runs-on: ubuntu-latest + name: OLCUT - Ubuntu Java SE 17 + steps: + - uses: actions/checkout@v4 + - name: Setup Oracle Java SE + uses: oracle-actions/setup-java@v1.4.0 + with: + website: oracle.com + release: 17 + version: 17.0.12 + - name: Build with Java 17 + run: mvn -B package --file pom.xml diff --git a/.github/workflows/maven-windows.yml b/.github/workflows/maven-windows.yml index 4dd864eb..c060b678 100644 --- a/.github/workflows/maven-windows.yml +++ b/.github/workflows/maven-windows.yml @@ -25,3 +25,16 @@ jobs: java-version: ${{ matrix.java }} - name: Build with Maven run: mvn -B package --file pom.xml + build-17: + runs-on: windows-latest + name: OLCUT - Windows Java SE 17 + steps: + - uses: actions/checkout@v4 + - name: Setup Oracle Java SE + uses: oracle-actions/setup-java@v1.4.0 + with: + website: oracle.com + release: 17 + version: 17.0.12 + - name: Build with Java 17 + run: mvn -B package --file pom.xml diff --git a/README.md b/README.md index c004116c..3869a442 100644 --- a/README.md +++ b/README.md @@ -234,6 +234,14 @@ SubprocessConnection | Provides a simple mechanism for communicating over stdio This project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md) +## Development + +To regenerate the protobuf implementations use the following command: + +```shell +protoc --java_out=olcut-config-protobuf/src/main/java/ --proto_path=olcut-config-protobuf/src/main/resources/ olcut-config-protobuf/src/main/resources/olcut_proto.proto +``` + ## Security Please consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process diff --git a/THIRD_PARTY_LICENSES.txt b/THIRD_PARTY_LICENSES.txt index 2cd1d07f..493751b5 100644 --- a/THIRD_PARTY_LICENSES.txt +++ b/THIRD_PARTY_LICENSES.txt @@ -1,6 +1,6 @@ -jline 3.22.0 +jline 3.27.1 -Copyright (c) 2002-2018, the original author or authors. +Copyright (c) 2002-2023, the original author or authors. All rights reserved. https://opensource.org/licenses/BSD-3-Clause @@ -35,7 +35,7 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -jackson-core, jackson-databind 2.14.1, 2.14.1 +jackson-core, jackson-databind 2.18.0, 2.18.0 Apache License @@ -240,9 +240,42 @@ jackson-core, jackson-databind 2.14.1, 2.14.1 See the License for the specific language governing permissions and limitations under the License. -junit 5.9.2 +# Jackson JSON processor -Copyright 2015-2021 the original author or authors. +Jackson is a high-performance, Free/Open Source JSON processing library. +It was originally written by Tatu Saloranta (tatu.saloranta@iki.fi), and has +been in development since 2007. +It is currently developed by a community of developers. + +## Copyright + +Copyright 2007-, Tatu Saloranta (tatu.saloranta@iki.fi) + +## Licensing + +Jackson 2.x core and extension components are licensed under Apache License 2.0 +To find the details that apply to this artifact see the accompanying LICENSE file. + +## Credits + +A list of contributors may be found from CREDITS(-2.x) file, which is included +in some artifacts (usually source distributions); but is always available +from the source code management (SCM) system project uses. + +## FastDoubleParser + +jackson-core bundles a shaded copy of FastDoubleParser . +That code is available under an MIT license +under the following copyright. + +Copyright © 2023 Werner Randelshofer, Switzerland. MIT License. + +See FastDoubleParser-NOTICE for details of other source code included in FastDoubleParser +and the licenses and copyrights that apply to that code. + +junit 5.11.3 + +Copyright 2015-2024 the original author or authors. Eclipse Public License - v 2.0 ============================== @@ -576,8 +609,9 @@ this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation. -protobuf-java 3.19.6 +protobuf-java 3.25.5 +Copyright 2024 Google LLC. All rights reserved. Copyright 2008 Google Inc. All rights reserved. Redistribution and use in source and binary forms, with or without @@ -610,3 +644,33 @@ Code generated by the Protocol Buffer compiler is owned by the owner of the input file used when generating it. This code is not standalone and requires a support library to be linked with it. This support library is itself covered by the above license. + +asm 9.7.1 + +ASM: a very small and fast Java bytecode manipulation framework +Copyright (c) 2000-2011 INRIA, France Telecom +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF +THE POSSIBILITY OF SUCH DAMAGE. diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ComponentProto.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ComponentProto.java index 41b00741..69e6b09b 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ComponentProto.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ComponentProto.java @@ -1,10 +1,12 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; /** *
+ *
  *A configurable component.
  * 
* @@ -36,131 +38,6 @@ protected java.lang.Object newInstance( return new ComponentProto(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ComponentProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000001; - type_ = s; - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - properties_ = com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - properties__ = input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - properties_.getMutableMap().put( - properties__.getKey(), properties__.getValue()); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - listProperty_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - listProperty_.add( - input.readMessage(com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto.parser(), extensionRegistry)); - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - mapProperty_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - mapProperty_.add( - input.readMessage(com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto.parser(), extensionRegistry)); - break; - } - case 50: { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000002; - override_ = s; - break; - } - case 56: { - bitField0_ |= 0x00000004; - exportable_ = input.readBool(); - break; - } - case 64: { - bitField0_ |= 0x00000008; - importable_ = input.readBool(); - break; - } - case 72: { - bitField0_ |= 0x00000010; - leaseTime_ = input.readInt64(); - break; - } - case 82: { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000020; - serialized_ = s; - break; - } - case 90: { - java.lang.String s = input.readStringRequireUtf8(); - bitField0_ |= 0x00000040; - entries_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - listProperty_ = java.util.Collections.unmodifiableList(listProperty_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - mapProperty_ = java.util.Collections.unmodifiableList(mapProperty_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.oracle.labs.mlrg.olcut.config.protobuf.protos.OlcutProto.internal_static_olcut_ComponentProto_descriptor; @@ -168,7 +45,7 @@ private ComponentProto( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: @@ -188,7 +65,8 @@ protected com.google.protobuf.MapField internalGetMapField( private int bitField0_; public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 1; * @return The name. @@ -226,7 +104,8 @@ public java.lang.String getName() { } public static final int TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object type_; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; /** * optional string type = 2; * @return Whether the type field is set. @@ -283,6 +162,7 @@ private static final class PropertiesDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.STRING, ""); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> properties_; private com.google.protobuf.MapField @@ -293,18 +173,16 @@ private static final class PropertiesDefaultEntryHolder { } return properties_; } - public int getPropertiesCount() { return internalGetProperties().getMap().size(); } /** * map<string, string> properties = 3; */ - @java.lang.Override public boolean containsProperties( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } return internalGetProperties().getMap().containsKey(key); } /** @@ -319,7 +197,6 @@ public java.util.Map getProperties() { * map<string, string> properties = 3; */ @java.lang.Override - public java.util.Map getPropertiesMap() { return internalGetProperties().getMap(); } @@ -327,11 +204,12 @@ public java.util.Map getPropertiesMap() { * map<string, string> properties = 3; */ @java.lang.Override - - public java.lang.String getPropertiesOrDefault( + public /* nullable */ +java.lang.String getPropertiesOrDefault( java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetProperties().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -340,10 +218,9 @@ public java.lang.String getPropertiesOrDefault( * map<string, string> properties = 3; */ @java.lang.Override - public java.lang.String getPropertiesOrThrow( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetProperties().getMap(); if (!map.containsKey(key)) { @@ -353,6 +230,7 @@ public java.lang.String getPropertiesOrThrow( } public static final int LIST_PROPERTY_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List listProperty_; /** * repeated .olcut.PropertyListProto list_property = 4; @@ -393,6 +271,7 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProtoOrBuil } public static final int MAP_PROPERTY_FIELD_NUMBER = 5; + @SuppressWarnings("serial") private java.util.List mapProperty_; /** * repeated .olcut.PropertyMapProto map_property = 5; @@ -433,7 +312,8 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProtoOrBuild } public static final int OVERRIDE_FIELD_NUMBER = 6; - private volatile java.lang.Object override_; + @SuppressWarnings("serial") + private volatile java.lang.Object override_ = ""; /** * optional string override = 6; * @return Whether the override field is set. @@ -479,7 +359,7 @@ public java.lang.String getOverride() { } public static final int EXPORTABLE_FIELD_NUMBER = 7; - private boolean exportable_; + private boolean exportable_ = false; /** * optional bool exportable = 7; * @return Whether the exportable field is set. @@ -498,7 +378,7 @@ public boolean getExportable() { } public static final int IMPORTABLE_FIELD_NUMBER = 8; - private boolean importable_; + private boolean importable_ = false; /** * optional bool importable = 8; * @return Whether the importable field is set. @@ -517,7 +397,7 @@ public boolean getImportable() { } public static final int LEASETIME_FIELD_NUMBER = 9; - private long leaseTime_; + private long leaseTime_ = 0L; /** * optional int64 leaseTime = 9; * @return Whether the leaseTime field is set. @@ -536,7 +416,8 @@ public long getLeaseTime() { } public static final int SERIALIZED_FIELD_NUMBER = 10; - private volatile java.lang.Object serialized_; + @SuppressWarnings("serial") + private volatile java.lang.Object serialized_ = ""; /** * optional string serialized = 10; * @return Whether the serialized field is set. @@ -582,7 +463,8 @@ public java.lang.String getSerialized() { } public static final int ENTRIES_FIELD_NUMBER = 11; - private volatile java.lang.Object entries_; + @SuppressWarnings("serial") + private volatile java.lang.Object entries_ = ""; /** * optional string entries = 11; * @return Whether the entries field is set. @@ -641,7 +523,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } if (((bitField0_ & 0x00000001) != 0)) { @@ -677,7 +559,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (((bitField0_ & 0x00000040) != 0)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, entries_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -686,7 +568,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } if (((bitField0_ & 0x00000001) != 0)) { @@ -731,7 +613,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000040) != 0)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, entries_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -789,7 +671,7 @@ public boolean equals(final java.lang.Object obj) { if (!getEntries() .equals(other.getEntries())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -845,7 +727,7 @@ public int hashCode() { hash = (37 * hash) + ENTRIES_FIELD_NUMBER; hash = (53 * hash) + getEntries().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -894,11 +776,13 @@ public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto p return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -942,6 +826,7 @@ protected Builder newBuilderForType( } /** *
+   *
    *A configurable component.
    * 
* @@ -957,7 +842,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 3: @@ -968,7 +853,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 3: @@ -988,53 +873,41 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getListPropertyFieldBuilder(); - getMapPropertyFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; - type_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); internalGetMutableProperties().clear(); if (listPropertyBuilder_ == null) { listProperty_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + listProperty_ = null; listPropertyBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); if (mapPropertyBuilder_ == null) { mapProperty_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + mapProperty_ = null; mapPropertyBuilder_.clear(); } - override_ = ""; bitField0_ = (bitField0_ & ~0x00000010); + override_ = ""; exportable_ = false; - bitField0_ = (bitField0_ & ~0x00000020); importable_ = false; - bitField0_ = (bitField0_ & ~0x00000040); leaseTime_ = 0L; - bitField0_ = (bitField0_ & ~0x00000080); serialized_ = ""; - bitField0_ = (bitField0_ & ~0x00000100); entries_ = ""; - bitField0_ = (bitField0_ & ~0x00000200); return this; } @@ -1061,60 +934,72 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto build() @java.lang.Override public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto buildPartial() { com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto result = new com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - result.name_ = name_; - if (((from_bitField0_ & 0x00000001) != 0)) { - to_bitField0_ |= 0x00000001; - } - result.type_ = type_; - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto result) { if (listPropertyBuilder_ == null) { - if (((bitField0_ & 0x00000004) != 0)) { + if (((bitField0_ & 0x00000008) != 0)) { listProperty_ = java.util.Collections.unmodifiableList(listProperty_); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } result.listProperty_ = listProperty_; } else { result.listProperty_ = listPropertyBuilder_.build(); } if (mapPropertyBuilder_ == null) { - if (((bitField0_ & 0x00000008) != 0)) { + if (((bitField0_ & 0x00000010) != 0)) { mapProperty_ = java.util.Collections.unmodifiableList(mapProperty_); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } result.mapProperty_ = mapProperty_; } else { result.mapProperty_ = mapPropertyBuilder_.build(); } - if (((from_bitField0_ & 0x00000010) != 0)) { - to_bitField0_ |= 0x00000002; + } + + private void buildPartial0(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + int to_bitField0_ = 0; + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + to_bitField0_ |= 0x00000001; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.properties_ = internalGetProperties(); + result.properties_.makeImmutable(); } - result.override_ = override_; if (((from_bitField0_ & 0x00000020) != 0)) { + result.override_ = override_; + to_bitField0_ |= 0x00000002; + } + if (((from_bitField0_ & 0x00000040) != 0)) { result.exportable_ = exportable_; to_bitField0_ |= 0x00000004; } - if (((from_bitField0_ & 0x00000040) != 0)) { + if (((from_bitField0_ & 0x00000080) != 0)) { result.importable_ = importable_; to_bitField0_ |= 0x00000008; } - if (((from_bitField0_ & 0x00000080) != 0)) { + if (((from_bitField0_ & 0x00000100) != 0)) { result.leaseTime_ = leaseTime_; to_bitField0_ |= 0x00000010; } - if (((from_bitField0_ & 0x00000100) != 0)) { + if (((from_bitField0_ & 0x00000200) != 0)) { + result.serialized_ = serialized_; to_bitField0_ |= 0x00000020; } - result.serialized_ = serialized_; - if (((from_bitField0_ & 0x00000200) != 0)) { + if (((from_bitField0_ & 0x00000400) != 0)) { + result.entries_ = entries_; to_bitField0_ |= 0x00000040; } - result.entries_ = entries_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + result.bitField0_ |= to_bitField0_; } @java.lang.Override @@ -1163,20 +1048,22 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Compo if (other == com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } if (other.hasType()) { - bitField0_ |= 0x00000001; type_ = other.type_; + bitField0_ |= 0x00000002; onChanged(); } internalGetMutableProperties().mergeFrom( other.internalGetProperties()); + bitField0_ |= 0x00000004; if (listPropertyBuilder_ == null) { if (!other.listProperty_.isEmpty()) { if (listProperty_.isEmpty()) { listProperty_ = other.listProperty_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); } else { ensureListPropertyIsMutable(); listProperty_.addAll(other.listProperty_); @@ -1189,7 +1076,7 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Compo listPropertyBuilder_.dispose(); listPropertyBuilder_ = null; listProperty_ = other.listProperty_; - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); listPropertyBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getListPropertyFieldBuilder() : null; @@ -1202,7 +1089,7 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Compo if (!other.mapProperty_.isEmpty()) { if (mapProperty_.isEmpty()) { mapProperty_ = other.mapProperty_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); } else { ensureMapPropertyIsMutable(); mapProperty_.addAll(other.mapProperty_); @@ -1215,7 +1102,7 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Compo mapPropertyBuilder_.dispose(); mapPropertyBuilder_ = null; mapProperty_ = other.mapProperty_; - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); mapPropertyBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getMapPropertyFieldBuilder() : null; @@ -1225,8 +1112,8 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Compo } } if (other.hasOverride()) { - bitField0_ |= 0x00000010; override_ = other.override_; + bitField0_ |= 0x00000020; onChanged(); } if (other.hasExportable()) { @@ -1239,16 +1126,16 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Compo setLeaseTime(other.getLeaseTime()); } if (other.hasSerialized()) { - bitField0_ |= 0x00000100; serialized_ = other.serialized_; + bitField0_ |= 0x00000200; onChanged(); } if (other.hasEntries()) { - bitField0_ |= 0x00000200; entries_ = other.entries_; + bitField0_ |= 0x00000400; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1263,17 +1150,105 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + com.google.protobuf.MapEntry + properties__ = input.readMessage( + PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableProperties().getMutableMap().put( + properties__.getKey(), properties__.getValue()); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto m = + input.readMessage( + com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto.parser(), + extensionRegistry); + if (listPropertyBuilder_ == null) { + ensureListPropertyIsMutable(); + listProperty_.add(m); + } else { + listPropertyBuilder_.addMessage(m); + } + break; + } // case 34 + case 42: { + com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto m = + input.readMessage( + com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto.parser(), + extensionRegistry); + if (mapPropertyBuilder_ == null) { + ensureMapPropertyIsMutable(); + mapProperty_.add(m); + } else { + mapPropertyBuilder_.addMessage(m); + } + break; + } // case 42 + case 50: { + override_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000020; + break; + } // case 50 + case 56: { + exportable_ = input.readBool(); + bitField0_ |= 0x00000040; + break; + } // case 56 + case 64: { + importable_ = input.readBool(); + bitField0_ |= 0x00000080; + break; + } // case 64 + case 72: { + leaseTime_ = input.readInt64(); + bitField0_ |= 0x00000100; + break; + } // case 72 + case 82: { + serialized_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000200; + break; + } // case 82 + case 90: { + entries_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000400; + break; + } // case 90 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -1319,11 +1294,9 @@ public java.lang.String getName() { */ public Builder setName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1332,8 +1305,8 @@ public Builder setName( * @return This builder for chaining. */ public Builder clearName() { - name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -1344,12 +1317,10 @@ public Builder clearName() { */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -1360,7 +1331,7 @@ public Builder setNameBytes( * @return Whether the type field is set. */ public boolean hasType() { - return ((bitField0_ & 0x00000001) != 0); + return ((bitField0_ & 0x00000002) != 0); } /** * optional string type = 2; @@ -1402,11 +1373,9 @@ public java.lang.String getType() { */ public Builder setType( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000001; + if (value == null) { throw new NullPointerException(); } type_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1415,8 +1384,8 @@ public Builder setType( * @return This builder for chaining. */ public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -1427,12 +1396,10 @@ public Builder clearType() { */ public Builder setTypeBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - bitField0_ |= 0x00000001; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); type_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -1440,7 +1407,7 @@ public Builder setTypeBytes( private com.google.protobuf.MapField< java.lang.String, java.lang.String> properties_; private com.google.protobuf.MapField - internalGetProperties() { + internalGetProperties() { if (properties_ == null) { return com.google.protobuf.MapField.emptyMapField( PropertiesDefaultEntryHolder.defaultEntry); @@ -1448,8 +1415,7 @@ public Builder setTypeBytes( return properties_; } private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged();; + internalGetMutableProperties() { if (properties_ == null) { properties_ = com.google.protobuf.MapField.newMapField( PropertiesDefaultEntryHolder.defaultEntry); @@ -1457,20 +1423,20 @@ public Builder setTypeBytes( if (!properties_.isMutable()) { properties_ = properties_.copy(); } + bitField0_ |= 0x00000004; + onChanged(); return properties_; } - public int getPropertiesCount() { return internalGetProperties().getMap().size(); } /** * map<string, string> properties = 3; */ - @java.lang.Override public boolean containsProperties( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } return internalGetProperties().getMap().containsKey(key); } /** @@ -1485,7 +1451,6 @@ public java.util.Map getProperties() { * map<string, string> properties = 3; */ @java.lang.Override - public java.util.Map getPropertiesMap() { return internalGetProperties().getMap(); } @@ -1493,11 +1458,12 @@ public java.util.Map getPropertiesMap() { * map<string, string> properties = 3; */ @java.lang.Override - - public java.lang.String getPropertiesOrDefault( + public /* nullable */ +java.lang.String getPropertiesOrDefault( java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetProperties().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -1506,10 +1472,9 @@ public java.lang.String getPropertiesOrDefault( * map<string, string> properties = 3; */ @java.lang.Override - public java.lang.String getPropertiesOrThrow( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetProperties().getMap(); if (!map.containsKey(key)) { @@ -1517,8 +1482,8 @@ public java.lang.String getPropertiesOrThrow( } return map.get(key); } - public Builder clearProperties() { + bitField0_ = (bitField0_ & ~0x00000004); internalGetMutableProperties().getMutableMap() .clear(); return this; @@ -1526,10 +1491,9 @@ public Builder clearProperties() { /** * map<string, string> properties = 3; */ - public Builder removeProperties( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } internalGetMutableProperties().getMutableMap() .remove(key); return this; @@ -1539,7 +1503,8 @@ public Builder removeProperties( */ @java.lang.Deprecated public java.util.Map - getMutableProperties() { + getMutableProperties() { + bitField0_ |= 0x00000004; return internalGetMutableProperties().getMutableMap(); } /** @@ -1548,29 +1513,30 @@ public Builder removeProperties( public Builder putProperties( java.lang.String key, java.lang.String value) { - if (key == null) { throw new java.lang.NullPointerException(); } - if (value == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } internalGetMutableProperties().getMutableMap() .put(key, value); + bitField0_ |= 0x00000004; return this; } /** * map<string, string> properties = 3; */ - public Builder putAllProperties( java.util.Map values) { internalGetMutableProperties().getMutableMap() .putAll(values); + bitField0_ |= 0x00000004; return this; } private java.util.List listProperty_ = java.util.Collections.emptyList(); private void ensureListPropertyIsMutable() { - if (!((bitField0_ & 0x00000004) != 0)) { + if (!((bitField0_ & 0x00000008) != 0)) { listProperty_ = new java.util.ArrayList(listProperty_); - bitField0_ |= 0x00000004; + bitField0_ |= 0x00000008; } } @@ -1720,7 +1686,7 @@ public Builder addAllListProperty( public Builder clearListProperty() { if (listPropertyBuilder_ == null) { listProperty_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { listPropertyBuilder_.clear(); @@ -1797,7 +1763,7 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto.Build listPropertyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto, com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto.Builder, com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProtoOrBuilder>( listProperty_, - ((bitField0_ & 0x00000004) != 0), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); listProperty_ = null; @@ -1808,9 +1774,9 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto.Build private java.util.List mapProperty_ = java.util.Collections.emptyList(); private void ensureMapPropertyIsMutable() { - if (!((bitField0_ & 0x00000008) != 0)) { + if (!((bitField0_ & 0x00000010) != 0)) { mapProperty_ = new java.util.ArrayList(mapProperty_); - bitField0_ |= 0x00000008; + bitField0_ |= 0x00000010; } } @@ -1960,7 +1926,7 @@ public Builder addAllMapProperty( public Builder clearMapProperty() { if (mapPropertyBuilder_ == null) { mapProperty_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { mapPropertyBuilder_.clear(); @@ -2037,7 +2003,7 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto.Builde mapPropertyBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto, com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto.Builder, com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProtoOrBuilder>( mapProperty_, - ((bitField0_ & 0x00000008) != 0), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); mapProperty_ = null; @@ -2051,7 +2017,7 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto.Builde * @return Whether the override field is set. */ public boolean hasOverride() { - return ((bitField0_ & 0x00000010) != 0); + return ((bitField0_ & 0x00000020) != 0); } /** * optional string override = 6; @@ -2093,11 +2059,9 @@ public java.lang.String getOverride() { */ public Builder setOverride( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000010; + if (value == null) { throw new NullPointerException(); } override_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2106,8 +2070,8 @@ public Builder setOverride( * @return This builder for chaining. */ public Builder clearOverride() { - bitField0_ = (bitField0_ & ~0x00000010); override_ = getDefaultInstance().getOverride(); + bitField0_ = (bitField0_ & ~0x00000020); onChanged(); return this; } @@ -2118,12 +2082,10 @@ public Builder clearOverride() { */ public Builder setOverrideBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - bitField0_ |= 0x00000010; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); override_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -2135,7 +2097,7 @@ public Builder setOverrideBytes( */ @java.lang.Override public boolean hasExportable() { - return ((bitField0_ & 0x00000020) != 0); + return ((bitField0_ & 0x00000040) != 0); } /** * optional bool exportable = 7; @@ -2151,8 +2113,9 @@ public boolean getExportable() { * @return This builder for chaining. */ public Builder setExportable(boolean value) { - bitField0_ |= 0x00000020; + exportable_ = value; + bitField0_ |= 0x00000040; onChanged(); return this; } @@ -2161,7 +2124,7 @@ public Builder setExportable(boolean value) { * @return This builder for chaining. */ public Builder clearExportable() { - bitField0_ = (bitField0_ & ~0x00000020); + bitField0_ = (bitField0_ & ~0x00000040); exportable_ = false; onChanged(); return this; @@ -2174,7 +2137,7 @@ public Builder clearExportable() { */ @java.lang.Override public boolean hasImportable() { - return ((bitField0_ & 0x00000040) != 0); + return ((bitField0_ & 0x00000080) != 0); } /** * optional bool importable = 8; @@ -2190,8 +2153,9 @@ public boolean getImportable() { * @return This builder for chaining. */ public Builder setImportable(boolean value) { - bitField0_ |= 0x00000040; + importable_ = value; + bitField0_ |= 0x00000080; onChanged(); return this; } @@ -2200,7 +2164,7 @@ public Builder setImportable(boolean value) { * @return This builder for chaining. */ public Builder clearImportable() { - bitField0_ = (bitField0_ & ~0x00000040); + bitField0_ = (bitField0_ & ~0x00000080); importable_ = false; onChanged(); return this; @@ -2213,7 +2177,7 @@ public Builder clearImportable() { */ @java.lang.Override public boolean hasLeaseTime() { - return ((bitField0_ & 0x00000080) != 0); + return ((bitField0_ & 0x00000100) != 0); } /** * optional int64 leaseTime = 9; @@ -2229,8 +2193,9 @@ public long getLeaseTime() { * @return This builder for chaining. */ public Builder setLeaseTime(long value) { - bitField0_ |= 0x00000080; + leaseTime_ = value; + bitField0_ |= 0x00000100; onChanged(); return this; } @@ -2239,7 +2204,7 @@ public Builder setLeaseTime(long value) { * @return This builder for chaining. */ public Builder clearLeaseTime() { - bitField0_ = (bitField0_ & ~0x00000080); + bitField0_ = (bitField0_ & ~0x00000100); leaseTime_ = 0L; onChanged(); return this; @@ -2251,7 +2216,7 @@ public Builder clearLeaseTime() { * @return Whether the serialized field is set. */ public boolean hasSerialized() { - return ((bitField0_ & 0x00000100) != 0); + return ((bitField0_ & 0x00000200) != 0); } /** * optional string serialized = 10; @@ -2293,11 +2258,9 @@ public java.lang.String getSerialized() { */ public Builder setSerialized( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000100; + if (value == null) { throw new NullPointerException(); } serialized_ = value; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -2306,8 +2269,8 @@ public Builder setSerialized( * @return This builder for chaining. */ public Builder clearSerialized() { - bitField0_ = (bitField0_ & ~0x00000100); serialized_ = getDefaultInstance().getSerialized(); + bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } @@ -2318,12 +2281,10 @@ public Builder clearSerialized() { */ public Builder setSerializedBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - bitField0_ |= 0x00000100; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); serialized_ = value; + bitField0_ |= 0x00000200; onChanged(); return this; } @@ -2334,7 +2295,7 @@ public Builder setSerializedBytes( * @return Whether the entries field is set. */ public boolean hasEntries() { - return ((bitField0_ & 0x00000200) != 0); + return ((bitField0_ & 0x00000400) != 0); } /** * optional string entries = 11; @@ -2376,11 +2337,9 @@ public java.lang.String getEntries() { */ public Builder setEntries( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000200; + if (value == null) { throw new NullPointerException(); } entries_ = value; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -2389,8 +2348,8 @@ public Builder setEntries( * @return This builder for chaining. */ public Builder clearEntries() { - bitField0_ = (bitField0_ & ~0x00000200); entries_ = getDefaultInstance().getEntries(); + bitField0_ = (bitField0_ & ~0x00000400); onChanged(); return this; } @@ -2401,12 +2360,10 @@ public Builder clearEntries() { */ public Builder setEntriesBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - bitField0_ |= 0x00000200; + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); entries_ = value; + bitField0_ |= 0x00000400; onChanged(); return this; } @@ -2443,7 +2400,18 @@ public ComponentProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ComponentProto(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ComponentProtoOrBuilder.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ComponentProtoOrBuilder.java index 8e426787..85059601 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ComponentProtoOrBuilder.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ComponentProtoOrBuilder.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; public interface ComponentProtoOrBuilder extends @@ -59,14 +60,14 @@ boolean containsProperties( /** * map<string, string> properties = 3; */ - - java.lang.String getPropertiesOrDefault( + /* nullable */ +java.lang.String getPropertiesOrDefault( java.lang.String key, - java.lang.String defaultValue); + /* nullable */ +java.lang.String defaultValue); /** * map<string, string> properties = 3; */ - java.lang.String getPropertiesOrThrow( java.lang.String key); diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigFileProto.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigFileProto.java index 5b8cd7b5..9ab5d638 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigFileProto.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigFileProto.java @@ -1,10 +1,12 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; /** *
+ *
  *A reference to another config file.
  * 
* @@ -31,60 +33,6 @@ protected java.lang.Object newInstance( return new ConfigFileProto(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ConfigFileProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.oracle.labs.mlrg.olcut.config.protobuf.protos.OlcutProto.internal_static_olcut_ConfigFileProto_descriptor; @@ -99,7 +47,8 @@ private ConfigFileProto( } public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 1; * @return The name. @@ -137,7 +86,8 @@ public java.lang.String getName() { } public static final int VALUE_FIELD_NUMBER = 2; - private volatile java.lang.Object value_; + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; /** * string value = 2; * @return The value. @@ -188,13 +138,13 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - if (!getValueBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, value_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -203,13 +153,13 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - if (!getValueBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, value_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -228,7 +178,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getName())) return false; if (!getValue() .equals(other.getValue())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -243,7 +193,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + VALUE_FIELD_NUMBER; hash = (53 * hash) + getValue().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -292,11 +242,13 @@ public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -340,6 +292,7 @@ protected Builder newBuilderForType( } /** *
+   *
    *A reference to another config file.
    * 
* @@ -364,26 +317,20 @@ public static final class Builder extends // Construct using com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; - value_ = ""; - return this; } @@ -410,12 +357,21 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto build() @java.lang.Override public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto buildPartial() { com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto result = new com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto(this); - result.name_ = name_; - result.value_ = value_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartial0(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.value_ = value_; + } + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -462,13 +418,15 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Confi if (other == com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getValue().isEmpty()) { value_ = other.value_; + bitField0_ |= 0x00000002; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -483,19 +441,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private java.lang.Object name_ = ""; /** @@ -538,11 +520,9 @@ public java.lang.String getName() { */ public Builder setName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -551,8 +531,8 @@ public Builder setName( * @return This builder for chaining. */ public Builder clearName() { - name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -563,12 +543,10 @@ public Builder clearName() { */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -614,11 +592,9 @@ public java.lang.String getValue() { */ public Builder setValue( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } value_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -627,8 +603,8 @@ public Builder setValue( * @return This builder for chaining. */ public Builder clearValue() { - value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -639,12 +615,10 @@ public Builder clearValue() { */ public Builder setValueBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); value_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -681,7 +655,18 @@ public ConfigFileProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfigFileProto(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigFileProtoOrBuilder.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigFileProtoOrBuilder.java index 15515481..3985f933 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigFileProtoOrBuilder.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigFileProtoOrBuilder.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; public interface ConfigFileProtoOrBuilder extends diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigProto.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigProto.java index 52be4a28..b68ca4bb 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigProto.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigProto.java @@ -1,10 +1,12 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; /** *
+ *
  *Root message which contains the full configuration.
  * 
* @@ -32,98 +34,6 @@ protected java.lang.Object newInstance( return new ConfigProto(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ConfigProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - properties_ = com.google.protobuf.MapField.newMapField( - PropertiesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - properties__ = input.readMessage( - PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - properties_.getMutableMap().put( - properties__.getKey(), properties__.getValue()); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - components_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - components_.add( - input.readMessage(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - configFile_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - configFile_.add( - input.readMessage(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - serializedObject_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - serializedObject_.add( - input.readMessage(com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - components_ = java.util.Collections.unmodifiableList(components_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - configFile_ = java.util.Collections.unmodifiableList(configFile_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - serializedObject_ = java.util.Collections.unmodifiableList(serializedObject_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.oracle.labs.mlrg.olcut.config.protobuf.protos.OlcutProto.internal_static_olcut_ConfigProto_descriptor; @@ -131,7 +41,7 @@ private ConfigProto( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 1: @@ -161,6 +71,7 @@ private static final class PropertiesDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.STRING, ""); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> properties_; private com.google.protobuf.MapField @@ -171,18 +82,16 @@ private static final class PropertiesDefaultEntryHolder { } return properties_; } - public int getPropertiesCount() { return internalGetProperties().getMap().size(); } /** * map<string, string> properties = 1; */ - @java.lang.Override public boolean containsProperties( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } return internalGetProperties().getMap().containsKey(key); } /** @@ -197,7 +106,6 @@ public java.util.Map getProperties() { * map<string, string> properties = 1; */ @java.lang.Override - public java.util.Map getPropertiesMap() { return internalGetProperties().getMap(); } @@ -205,11 +113,12 @@ public java.util.Map getPropertiesMap() { * map<string, string> properties = 1; */ @java.lang.Override - - public java.lang.String getPropertiesOrDefault( + public /* nullable */ +java.lang.String getPropertiesOrDefault( java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetProperties().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -218,10 +127,9 @@ public java.lang.String getPropertiesOrDefault( * map<string, string> properties = 1; */ @java.lang.Override - public java.lang.String getPropertiesOrThrow( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetProperties().getMap(); if (!map.containsKey(key)) { @@ -231,6 +139,7 @@ public java.lang.String getPropertiesOrThrow( } public static final int COMPONENTS_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private java.util.List components_; /** * repeated .olcut.ComponentProto components = 2; @@ -271,6 +180,7 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProtoOrBuilder } public static final int CONFIG_FILE_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List configFile_; /** * repeated .olcut.ConfigFileProto config_file = 3; @@ -311,6 +221,7 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProtoOrBuilde } public static final int SERIALIZED_OBJECT_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List serializedObject_; /** * repeated .olcut.SerializedObjectProto serialized_object = 4; @@ -379,7 +290,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < serializedObject_.size(); i++) { output.writeMessage(4, serializedObject_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -410,7 +321,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, serializedObject_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -433,7 +344,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getConfigFileList())) return false; if (!getSerializedObjectList() .equals(other.getSerializedObjectList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -460,7 +371,7 @@ public int hashCode() { hash = (37 * hash) + SERIALIZED_OBJECT_FIELD_NUMBER; hash = (53 * hash) + getSerializedObjectList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -509,11 +420,13 @@ public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto pars return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -557,6 +470,7 @@ protected Builder newBuilderForType( } /** *
+   *
    *Root message which contains the full configuration.
    * 
* @@ -572,7 +486,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 1: @@ -583,7 +497,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 1: @@ -603,44 +517,40 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getComponentsFieldBuilder(); - getConfigFileFieldBuilder(); - getSerializedObjectFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; internalGetMutableProperties().clear(); if (componentsBuilder_ == null) { components_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + components_ = null; componentsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (configFileBuilder_ == null) { configFile_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + configFile_ = null; configFileBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (serializedObjectBuilder_ == null) { serializedObject_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + serializedObject_ = null; serializedObjectBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -667,9 +577,13 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto build() { @java.lang.Override public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto buildPartial() { com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto result = new com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto(this); - int from_bitField0_ = bitField0_; - result.properties_ = internalGetProperties(); - result.properties_.makeImmutable(); + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto result) { if (componentsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { components_ = java.util.Collections.unmodifiableList(components_); @@ -697,8 +611,14 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto buildPartia } else { result.serializedObject_ = serializedObjectBuilder_.build(); } - onBuilt(); - return result; + } + + private void buildPartial0(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.properties_ = internalGetProperties(); + result.properties_.makeImmutable(); + } } @java.lang.Override @@ -747,6 +667,7 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Confi if (other == com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto.getDefaultInstance()) return this; internalGetMutableProperties().mergeFrom( other.internalGetProperties()); + bitField0_ |= 0x00000001; if (componentsBuilder_ == null) { if (!other.components_.isEmpty()) { if (components_.isEmpty()) { @@ -825,7 +746,7 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Confi } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -840,17 +761,78 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.google.protobuf.MapEntry + properties__ = input.readMessage( + PropertiesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableProperties().getMutableMap().put( + properties__.getKey(), properties__.getValue()); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto m = + input.readMessage( + com.oracle.labs.mlrg.olcut.config.protobuf.protos.ComponentProto.parser(), + extensionRegistry); + if (componentsBuilder_ == null) { + ensureComponentsIsMutable(); + components_.add(m); + } else { + componentsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto m = + input.readMessage( + com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigFileProto.parser(), + extensionRegistry); + if (configFileBuilder_ == null) { + ensureConfigFileIsMutable(); + configFile_.add(m); + } else { + configFileBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto m = + input.readMessage( + com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto.parser(), + extensionRegistry); + if (serializedObjectBuilder_ == null) { + ensureSerializedObjectIsMutable(); + serializedObject_.add(m); + } else { + serializedObjectBuilder_.addMessage(m); + } + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.oracle.labs.mlrg.olcut.config.protobuf.protos.ConfigProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -858,7 +840,7 @@ public Builder mergeFrom( private com.google.protobuf.MapField< java.lang.String, java.lang.String> properties_; private com.google.protobuf.MapField - internalGetProperties() { + internalGetProperties() { if (properties_ == null) { return com.google.protobuf.MapField.emptyMapField( PropertiesDefaultEntryHolder.defaultEntry); @@ -866,8 +848,7 @@ public Builder mergeFrom( return properties_; } private com.google.protobuf.MapField - internalGetMutableProperties() { - onChanged();; + internalGetMutableProperties() { if (properties_ == null) { properties_ = com.google.protobuf.MapField.newMapField( PropertiesDefaultEntryHolder.defaultEntry); @@ -875,20 +856,20 @@ public Builder mergeFrom( if (!properties_.isMutable()) { properties_ = properties_.copy(); } + bitField0_ |= 0x00000001; + onChanged(); return properties_; } - public int getPropertiesCount() { return internalGetProperties().getMap().size(); } /** * map<string, string> properties = 1; */ - @java.lang.Override public boolean containsProperties( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } return internalGetProperties().getMap().containsKey(key); } /** @@ -903,7 +884,6 @@ public java.util.Map getProperties() { * map<string, string> properties = 1; */ @java.lang.Override - public java.util.Map getPropertiesMap() { return internalGetProperties().getMap(); } @@ -911,11 +891,12 @@ public java.util.Map getPropertiesMap() { * map<string, string> properties = 1; */ @java.lang.Override - - public java.lang.String getPropertiesOrDefault( + public /* nullable */ +java.lang.String getPropertiesOrDefault( java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetProperties().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -924,10 +905,9 @@ public java.lang.String getPropertiesOrDefault( * map<string, string> properties = 1; */ @java.lang.Override - public java.lang.String getPropertiesOrThrow( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetProperties().getMap(); if (!map.containsKey(key)) { @@ -935,8 +915,8 @@ public java.lang.String getPropertiesOrThrow( } return map.get(key); } - public Builder clearProperties() { + bitField0_ = (bitField0_ & ~0x00000001); internalGetMutableProperties().getMutableMap() .clear(); return this; @@ -944,10 +924,9 @@ public Builder clearProperties() { /** * map<string, string> properties = 1; */ - public Builder removeProperties( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } internalGetMutableProperties().getMutableMap() .remove(key); return this; @@ -957,7 +936,8 @@ public Builder removeProperties( */ @java.lang.Deprecated public java.util.Map - getMutableProperties() { + getMutableProperties() { + bitField0_ |= 0x00000001; return internalGetMutableProperties().getMutableMap(); } /** @@ -966,20 +946,21 @@ public Builder removeProperties( public Builder putProperties( java.lang.String key, java.lang.String value) { - if (key == null) { throw new java.lang.NullPointerException(); } - if (value == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } internalGetMutableProperties().getMutableMap() .put(key, value); + bitField0_ |= 0x00000001; return this; } /** * map<string, string> properties = 1; */ - public Builder putAllProperties( java.util.Map values) { internalGetMutableProperties().getMutableMap() .putAll(values); + bitField0_ |= 0x00000001; return this; } @@ -1735,7 +1716,18 @@ public ConfigProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConfigProto(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigProtoOrBuilder.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigProtoOrBuilder.java index d2ef9353..9b05a2b4 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigProtoOrBuilder.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ConfigProtoOrBuilder.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; public interface ConfigProtoOrBuilder extends @@ -30,14 +31,14 @@ boolean containsProperties( /** * map<string, string> properties = 1; */ - - java.lang.String getPropertiesOrDefault( + /* nullable */ +java.lang.String getPropertiesOrDefault( java.lang.String key, - java.lang.String defaultValue); + /* nullable */ +java.lang.String defaultValue); /** * map<string, string> properties = 1; */ - java.lang.String getPropertiesOrThrow( java.lang.String key); diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ListProvenanceProto.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ListProvenanceProto.java index 0710acc4..3666f1df 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ListProvenanceProto.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ListProvenanceProto.java @@ -1,10 +1,12 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; /** *
+ *
  *A ListMarshalledProvenance proto with the references converted into indices.
  * 
* @@ -30,78 +32,6 @@ protected java.lang.Object newInstance( return new ListProvenanceProto(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ListProvenanceProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - index_ = input.readInt32(); - break; - } - case 16: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - values_.addInt(input.readInt32()); - break; - } - case 18: { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - values_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - values_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - values_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.oracle.labs.mlrg.olcut.config.protobuf.protos.OlcutProto.internal_static_olcut_ListProvenanceProto_descriptor; @@ -116,7 +46,7 @@ private ListProvenanceProto( } public static final int INDEX_FIELD_NUMBER = 1; - private int index_; + private int index_ = 0; /** * int32 index = 1; * @return The index. @@ -127,7 +57,9 @@ public int getIndex() { } public static final int VALUES_FIELD_NUMBER = 2; - private com.google.protobuf.Internal.IntList values_; + @SuppressWarnings("serial") + private com.google.protobuf.Internal.IntList values_ = + emptyIntList(); /** * repeated int32 values = 2; * @return A list containing the values. @@ -179,7 +111,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < values_.size(); i++) { output.writeInt32NoTag(values_.getInt(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -206,7 +138,7 @@ public int getSerializedSize() { } valuesMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -225,7 +157,7 @@ public boolean equals(final java.lang.Object obj) { != other.getIndex()) return false; if (!getValuesList() .equals(other.getValuesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -242,7 +174,7 @@ public int hashCode() { hash = (37 * hash) + VALUES_FIELD_NUMBER; hash = (53 * hash) + getValuesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -291,11 +223,13 @@ public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenancePr return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -339,6 +273,7 @@ protected Builder newBuilderForType( } /** *
+   *
    *A ListMarshalledProvenance proto with the references converted into indices.
    * 
* @@ -363,26 +298,20 @@ public static final class Builder extends // Construct using com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; index_ = 0; - values_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -409,15 +338,20 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto bui @java.lang.Override public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto buildPartial() { com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto result = new com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto result) { int from_bitField0_ = bitField0_; - result.index_ = index_; - if (((bitField0_ & 0x00000001) != 0)) { + if (((from_bitField0_ & 0x00000001) != 0)) { + result.index_ = index_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { values_.makeImmutable(); - bitField0_ = (bitField0_ & ~0x00000001); + result.values_ = values_; } - result.values_ = values_; - onBuilt(); - return result; } @java.lang.Override @@ -470,14 +404,15 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListP if (!other.values_.isEmpty()) { if (values_.isEmpty()) { values_ = other.values_; - bitField0_ = (bitField0_ & ~0x00000001); + values_.makeImmutable(); + bitField0_ |= 0x00000002; } else { ensureValuesIsMutable(); values_.addAll(other.values_); } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -492,17 +427,51 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + index_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 16: { + int v = input.readInt32(); + ensureValuesIsMutable(); + values_.addInt(v); + break; + } // case 16 + case 18: { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureValuesIsMutable(); + while (input.getBytesUntilLimit() > 0) { + values_.addInt(input.readInt32()); + } + input.popLimit(limit); + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -522,8 +491,9 @@ public int getIndex() { * @return This builder for chaining. */ public Builder setIndex(int value) { - + index_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -532,7 +502,7 @@ public Builder setIndex(int value) { * @return This builder for chaining. */ public Builder clearIndex() { - + bitField0_ = (bitField0_ & ~0x00000001); index_ = 0; onChanged(); return this; @@ -540,10 +510,10 @@ public Builder clearIndex() { private com.google.protobuf.Internal.IntList values_ = emptyIntList(); private void ensureValuesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - values_ = mutableCopy(values_); - bitField0_ |= 0x00000001; - } + if (!values_.isModifiable()) { + values_ = makeMutableCopy(values_); + } + bitField0_ |= 0x00000002; } /** * repeated int32 values = 2; @@ -551,8 +521,8 @@ private void ensureValuesIsMutable() { */ public java.util.List getValuesList() { - return ((bitField0_ & 0x00000001) != 0) ? - java.util.Collections.unmodifiableList(values_) : values_; + values_.makeImmutable(); + return values_; } /** * repeated int32 values = 2; @@ -577,8 +547,10 @@ public int getValues(int index) { */ public Builder setValues( int index, int value) { + ensureValuesIsMutable(); values_.setInt(index, value); + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -588,8 +560,10 @@ public Builder setValues( * @return This builder for chaining. */ public Builder addValues(int value) { + ensureValuesIsMutable(); values_.addInt(value); + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -603,6 +577,7 @@ public Builder addAllValues( ensureValuesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, values_); + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -612,7 +587,7 @@ public Builder addAllValues( */ public Builder clearValues() { values_ = emptyIntList(); - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -649,7 +624,18 @@ public ListProvenanceProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProvenanceProto(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ListProvenanceProtoOrBuilder.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ListProvenanceProtoOrBuilder.java index fca22816..e46d3622 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ListProvenanceProtoOrBuilder.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ListProvenanceProtoOrBuilder.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; public interface ListProvenanceProtoOrBuilder extends diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/MapProvenanceProto.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/MapProvenanceProto.java index 84e6a262..22b7294c 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/MapProvenanceProto.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/MapProvenanceProto.java @@ -1,10 +1,12 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; /** *
+ *
  *A MapMarshalledProvenance proto with the references converted into indices.
  * 
* @@ -29,67 +31,6 @@ protected java.lang.Object newInstance( return new MapProvenanceProto(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private MapProvenanceProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - index_ = input.readInt32(); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = com.google.protobuf.MapField.newMapField( - ValuesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - values__ = input.readMessage( - ValuesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - values_.getMutableMap().put( - values__.getKey(), values__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.oracle.labs.mlrg.olcut.config.protobuf.protos.OlcutProto.internal_static_olcut_MapProvenanceProto_descriptor; @@ -97,7 +38,7 @@ private MapProvenanceProto( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 2: @@ -116,7 +57,7 @@ protected com.google.protobuf.MapField internalGetMapField( } public static final int INDEX_FIELD_NUMBER = 1; - private int index_; + private int index_ = 0; /** * int32 index = 1; * @return The index. @@ -138,6 +79,7 @@ private static final class ValuesDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.INT32, 0); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.Integer> values_; private com.google.protobuf.MapField @@ -148,18 +90,16 @@ private static final class ValuesDefaultEntryHolder { } return values_; } - public int getValuesCount() { return internalGetValues().getMap().size(); } /** * map<string, int32> values = 2; */ - @java.lang.Override public boolean containsValues( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } return internalGetValues().getMap().containsKey(key); } /** @@ -174,7 +114,6 @@ public java.util.Map getValues() { * map<string, int32> values = 2; */ @java.lang.Override - public java.util.Map getValuesMap() { return internalGetValues().getMap(); } @@ -182,11 +121,10 @@ public java.util.Map getValuesMap() { * map<string, int32> values = 2; */ @java.lang.Override - public int getValuesOrDefault( java.lang.String key, int defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetValues().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -195,10 +133,9 @@ public int getValuesOrDefault( * map<string, int32> values = 2; */ @java.lang.Override - public int getValuesOrThrow( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetValues().getMap(); if (!map.containsKey(key)) { @@ -230,7 +167,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetValues(), ValuesDefaultEntryHolder.defaultEntry, 2); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -253,7 +190,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, values__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +209,7 @@ public boolean equals(final java.lang.Object obj) { != other.getIndex()) return false; if (!internalGetValues().equals( other.internalGetValues())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -289,7 +226,7 @@ public int hashCode() { hash = (37 * hash) + VALUES_FIELD_NUMBER; hash = (53 * hash) + internalGetValues().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -338,11 +275,13 @@ public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenancePro return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -386,6 +325,7 @@ protected Builder newBuilderForType( } /** *
+   *
    *A MapMarshalledProvenance proto with the references converted into indices.
    * 
* @@ -401,7 +341,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 2: @@ -412,7 +352,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 2: @@ -432,24 +372,19 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; index_ = 0; - internalGetMutableValues().clear(); return this; } @@ -477,14 +412,22 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto buil @java.lang.Override public com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto buildPartial() { com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto result = new com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto(this); - int from_bitField0_ = bitField0_; - result.index_ = index_; - result.values_ = internalGetValues(); - result.values_.makeImmutable(); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartial0(com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.index_ = index_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.values_ = internalGetValues(); + result.values_.makeImmutable(); + } + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -534,7 +477,8 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapPr } internalGetMutableValues().mergeFrom( other.internalGetValues()); - this.mergeUnknownFields(other.unknownFields); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -549,17 +493,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + index_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + com.google.protobuf.MapEntry + values__ = input.readMessage( + ValuesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableValues().getMutableMap().put( + values__.getKey(), values__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -579,8 +550,9 @@ public int getIndex() { * @return This builder for chaining. */ public Builder setIndex(int value) { - + index_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -589,7 +561,7 @@ public Builder setIndex(int value) { * @return This builder for chaining. */ public Builder clearIndex() { - + bitField0_ = (bitField0_ & ~0x00000001); index_ = 0; onChanged(); return this; @@ -598,7 +570,7 @@ public Builder clearIndex() { private com.google.protobuf.MapField< java.lang.String, java.lang.Integer> values_; private com.google.protobuf.MapField - internalGetValues() { + internalGetValues() { if (values_ == null) { return com.google.protobuf.MapField.emptyMapField( ValuesDefaultEntryHolder.defaultEntry); @@ -606,8 +578,7 @@ public Builder clearIndex() { return values_; } private com.google.protobuf.MapField - internalGetMutableValues() { - onChanged();; + internalGetMutableValues() { if (values_ == null) { values_ = com.google.protobuf.MapField.newMapField( ValuesDefaultEntryHolder.defaultEntry); @@ -615,20 +586,20 @@ public Builder clearIndex() { if (!values_.isMutable()) { values_ = values_.copy(); } + bitField0_ |= 0x00000002; + onChanged(); return values_; } - public int getValuesCount() { return internalGetValues().getMap().size(); } /** * map<string, int32> values = 2; */ - @java.lang.Override public boolean containsValues( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } return internalGetValues().getMap().containsKey(key); } /** @@ -643,7 +614,6 @@ public java.util.Map getValues() { * map<string, int32> values = 2; */ @java.lang.Override - public java.util.Map getValuesMap() { return internalGetValues().getMap(); } @@ -651,11 +621,10 @@ public java.util.Map getValuesMap() { * map<string, int32> values = 2; */ @java.lang.Override - public int getValuesOrDefault( java.lang.String key, int defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetValues().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -664,10 +633,9 @@ public int getValuesOrDefault( * map<string, int32> values = 2; */ @java.lang.Override - public int getValuesOrThrow( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetValues().getMap(); if (!map.containsKey(key)) { @@ -675,8 +643,8 @@ public int getValuesOrThrow( } return map.get(key); } - public Builder clearValues() { + bitField0_ = (bitField0_ & ~0x00000002); internalGetMutableValues().getMutableMap() .clear(); return this; @@ -684,10 +652,9 @@ public Builder clearValues() { /** * map<string, int32> values = 2; */ - public Builder removeValues( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } internalGetMutableValues().getMutableMap() .remove(key); return this; @@ -697,7 +664,8 @@ public Builder removeValues( */ @java.lang.Deprecated public java.util.Map - getMutableValues() { + getMutableValues() { + bitField0_ |= 0x00000002; return internalGetMutableValues().getMutableMap(); } /** @@ -706,20 +674,21 @@ public Builder removeValues( public Builder putValues( java.lang.String key, int value) { - if (key == null) { throw new java.lang.NullPointerException(); } - + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableValues().getMutableMap() .put(key, value); + bitField0_ |= 0x00000002; return this; } /** * map<string, int32> values = 2; */ - public Builder putAllValues( java.util.Map values) { internalGetMutableValues().getMutableMap() .putAll(values); + bitField0_ |= 0x00000002; return this; } @java.lang.Override @@ -755,7 +724,18 @@ public MapProvenanceProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MapProvenanceProto(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/MapProvenanceProtoOrBuilder.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/MapProvenanceProtoOrBuilder.java index 78105dce..575c983a 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/MapProvenanceProtoOrBuilder.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/MapProvenanceProtoOrBuilder.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; public interface MapProvenanceProtoOrBuilder extends @@ -36,14 +37,12 @@ boolean containsValues( /** * map<string, int32> values = 2; */ - int getValuesOrDefault( java.lang.String key, int defaultValue); /** * map<string, int32> values = 2; */ - int getValuesOrThrow( java.lang.String key); } diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ObjectProvenanceProto.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ObjectProvenanceProto.java index 8d18ed9c..392f5f06 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ObjectProvenanceProto.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ObjectProvenanceProto.java @@ -1,10 +1,12 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; /** *
+ *
  *An ObjectMarshalledProvenance proto with the references converted into indices.
  * 
* @@ -32,85 +34,6 @@ protected java.lang.Object newInstance( return new ObjectProvenanceProto(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private ObjectProvenanceProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - index_ = input.readInt32(); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - objectName_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - objectClassName_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - provenanceClassName_ = s; - break; - } - case 42: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = com.google.protobuf.MapField.newMapField( - ValuesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - values__ = input.readMessage( - ValuesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - values_.getMutableMap().put( - values__.getKey(), values__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.oracle.labs.mlrg.olcut.config.protobuf.protos.OlcutProto.internal_static_olcut_ObjectProvenanceProto_descriptor; @@ -118,7 +41,7 @@ private ObjectProvenanceProto( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 5: @@ -137,7 +60,7 @@ protected com.google.protobuf.MapField internalGetMapField( } public static final int INDEX_FIELD_NUMBER = 1; - private int index_; + private int index_ = 0; /** * int32 index = 1; * @return The index. @@ -148,7 +71,8 @@ public int getIndex() { } public static final int OBJECT_NAME_FIELD_NUMBER = 2; - private volatile java.lang.Object objectName_; + @SuppressWarnings("serial") + private volatile java.lang.Object objectName_ = ""; /** * string object_name = 2; * @return The objectName. @@ -186,7 +110,8 @@ public java.lang.String getObjectName() { } public static final int OBJECT_CLASS_NAME_FIELD_NUMBER = 3; - private volatile java.lang.Object objectClassName_; + @SuppressWarnings("serial") + private volatile java.lang.Object objectClassName_ = ""; /** * string object_class_name = 3; * @return The objectClassName. @@ -224,7 +149,8 @@ public java.lang.String getObjectClassName() { } public static final int PROVENANCE_CLASS_NAME_FIELD_NUMBER = 4; - private volatile java.lang.Object provenanceClassName_; + @SuppressWarnings("serial") + private volatile java.lang.Object provenanceClassName_ = ""; /** * string provenance_class_name = 4; * @return The provenanceClassName. @@ -273,6 +199,7 @@ private static final class ValuesDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.INT32, 0); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.Integer> values_; private com.google.protobuf.MapField @@ -283,18 +210,16 @@ private static final class ValuesDefaultEntryHolder { } return values_; } - public int getValuesCount() { return internalGetValues().getMap().size(); } /** * map<string, int32> values = 5; */ - @java.lang.Override public boolean containsValues( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } return internalGetValues().getMap().containsKey(key); } /** @@ -309,7 +234,6 @@ public java.util.Map getValues() { * map<string, int32> values = 5; */ @java.lang.Override - public java.util.Map getValuesMap() { return internalGetValues().getMap(); } @@ -317,11 +241,10 @@ public java.util.Map getValuesMap() { * map<string, int32> values = 5; */ @java.lang.Override - public int getValuesOrDefault( java.lang.String key, int defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetValues().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -330,10 +253,9 @@ public int getValuesOrDefault( * map<string, int32> values = 5; */ @java.lang.Override - public int getValuesOrThrow( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetValues().getMap(); if (!map.containsKey(key)) { @@ -359,13 +281,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (index_ != 0) { output.writeInt32(1, index_); } - if (!getObjectNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, objectName_); } - if (!getObjectClassNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectClassName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, objectClassName_); } - if (!getProvenanceClassNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceClassName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, provenanceClassName_); } com.google.protobuf.GeneratedMessageV3 @@ -374,7 +296,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetValues(), ValuesDefaultEntryHolder.defaultEntry, 5); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -387,13 +309,13 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, index_); } - if (!getObjectNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, objectName_); } - if (!getObjectClassNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(objectClassName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, objectClassName_); } - if (!getProvenanceClassNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceClassName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, provenanceClassName_); } for (java.util.Map.Entry entry @@ -406,7 +328,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, values__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -431,7 +353,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getProvenanceClassName())) return false; if (!internalGetValues().equals( other.internalGetValues())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -454,7 +376,7 @@ public int hashCode() { hash = (37 * hash) + VALUES_FIELD_NUMBER; hash = (53 * hash) + internalGetValues().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -503,11 +425,13 @@ public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenance return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -551,6 +475,7 @@ protected Builder newBuilderForType( } /** *
+   *
    *An ObjectMarshalledProvenance proto with the references converted into indices.
    * 
* @@ -566,7 +491,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 5: @@ -577,7 +502,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 5: @@ -597,30 +522,22 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; index_ = 0; - objectName_ = ""; - objectClassName_ = ""; - provenanceClassName_ = ""; - internalGetMutableValues().clear(); return this; } @@ -648,17 +565,31 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto b @java.lang.Override public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto buildPartial() { com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto result = new com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto(this); - int from_bitField0_ = bitField0_; - result.index_ = index_; - result.objectName_ = objectName_; - result.objectClassName_ = objectClassName_; - result.provenanceClassName_ = provenanceClassName_; - result.values_ = internalGetValues(); - result.values_.makeImmutable(); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartial0(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.index_ = index_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.objectName_ = objectName_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.objectClassName_ = objectClassName_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.provenanceClassName_ = provenanceClassName_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.values_ = internalGetValues(); + result.values_.makeImmutable(); + } + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -708,19 +639,23 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Objec } if (!other.getObjectName().isEmpty()) { objectName_ = other.objectName_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getObjectClassName().isEmpty()) { objectClassName_ = other.objectClassName_; + bitField0_ |= 0x00000004; onChanged(); } if (!other.getProvenanceClassName().isEmpty()) { provenanceClassName_ = other.provenanceClassName_; + bitField0_ |= 0x00000008; onChanged(); } internalGetMutableValues().mergeFrom( other.internalGetValues()); - this.mergeUnknownFields(other.unknownFields); + bitField0_ |= 0x00000010; + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -735,17 +670,59 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + index_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + objectName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + objectClassName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + provenanceClassName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + com.google.protobuf.MapEntry + values__ = input.readMessage( + ValuesDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableValues().getMutableMap().put( + values__.getKey(), values__.getValue()); + bitField0_ |= 0x00000010; + break; + } // case 42 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -765,8 +742,9 @@ public int getIndex() { * @return This builder for chaining. */ public Builder setIndex(int value) { - + index_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -775,7 +753,7 @@ public Builder setIndex(int value) { * @return This builder for chaining. */ public Builder clearIndex() { - + bitField0_ = (bitField0_ & ~0x00000001); index_ = 0; onChanged(); return this; @@ -822,11 +800,9 @@ public java.lang.String getObjectName() { */ public Builder setObjectName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } objectName_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -835,8 +811,8 @@ public Builder setObjectName( * @return This builder for chaining. */ public Builder clearObjectName() { - objectName_ = getDefaultInstance().getObjectName(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -847,12 +823,10 @@ public Builder clearObjectName() { */ public Builder setObjectNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); objectName_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -898,11 +872,9 @@ public java.lang.String getObjectClassName() { */ public Builder setObjectClassName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } objectClassName_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -911,8 +883,8 @@ public Builder setObjectClassName( * @return This builder for chaining. */ public Builder clearObjectClassName() { - objectClassName_ = getDefaultInstance().getObjectClassName(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -923,12 +895,10 @@ public Builder clearObjectClassName() { */ public Builder setObjectClassNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); objectClassName_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -974,11 +944,9 @@ public java.lang.String getProvenanceClassName() { */ public Builder setProvenanceClassName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } provenanceClassName_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -987,8 +955,8 @@ public Builder setProvenanceClassName( * @return This builder for chaining. */ public Builder clearProvenanceClassName() { - provenanceClassName_ = getDefaultInstance().getProvenanceClassName(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -999,12 +967,10 @@ public Builder clearProvenanceClassName() { */ public Builder setProvenanceClassNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); provenanceClassName_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -1012,7 +978,7 @@ public Builder setProvenanceClassNameBytes( private com.google.protobuf.MapField< java.lang.String, java.lang.Integer> values_; private com.google.protobuf.MapField - internalGetValues() { + internalGetValues() { if (values_ == null) { return com.google.protobuf.MapField.emptyMapField( ValuesDefaultEntryHolder.defaultEntry); @@ -1020,8 +986,7 @@ public Builder setProvenanceClassNameBytes( return values_; } private com.google.protobuf.MapField - internalGetMutableValues() { - onChanged();; + internalGetMutableValues() { if (values_ == null) { values_ = com.google.protobuf.MapField.newMapField( ValuesDefaultEntryHolder.defaultEntry); @@ -1029,20 +994,20 @@ public Builder setProvenanceClassNameBytes( if (!values_.isMutable()) { values_ = values_.copy(); } + bitField0_ |= 0x00000010; + onChanged(); return values_; } - public int getValuesCount() { return internalGetValues().getMap().size(); } /** * map<string, int32> values = 5; */ - @java.lang.Override public boolean containsValues( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } return internalGetValues().getMap().containsKey(key); } /** @@ -1057,7 +1022,6 @@ public java.util.Map getValues() { * map<string, int32> values = 5; */ @java.lang.Override - public java.util.Map getValuesMap() { return internalGetValues().getMap(); } @@ -1065,11 +1029,10 @@ public java.util.Map getValuesMap() { * map<string, int32> values = 5; */ @java.lang.Override - public int getValuesOrDefault( java.lang.String key, int defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetValues().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -1078,10 +1041,9 @@ public int getValuesOrDefault( * map<string, int32> values = 5; */ @java.lang.Override - public int getValuesOrThrow( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetValues().getMap(); if (!map.containsKey(key)) { @@ -1089,8 +1051,8 @@ public int getValuesOrThrow( } return map.get(key); } - public Builder clearValues() { + bitField0_ = (bitField0_ & ~0x00000010); internalGetMutableValues().getMutableMap() .clear(); return this; @@ -1098,10 +1060,9 @@ public Builder clearValues() { /** * map<string, int32> values = 5; */ - public Builder removeValues( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } internalGetMutableValues().getMutableMap() .remove(key); return this; @@ -1111,7 +1072,8 @@ public Builder removeValues( */ @java.lang.Deprecated public java.util.Map - getMutableValues() { + getMutableValues() { + bitField0_ |= 0x00000010; return internalGetMutableValues().getMutableMap(); } /** @@ -1120,20 +1082,21 @@ public Builder removeValues( public Builder putValues( java.lang.String key, int value) { - if (key == null) { throw new java.lang.NullPointerException(); } - + if (key == null) { throw new NullPointerException("map key"); } + internalGetMutableValues().getMutableMap() .put(key, value); + bitField0_ |= 0x00000010; return this; } /** * map<string, int32> values = 5; */ - public Builder putAllValues( java.util.Map values) { internalGetMutableValues().getMutableMap() .putAll(values); + bitField0_ |= 0x00000010; return this; } @java.lang.Override @@ -1169,7 +1132,18 @@ public ObjectProvenanceProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ObjectProvenanceProto(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ObjectProvenanceProtoOrBuilder.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ObjectProvenanceProtoOrBuilder.java index 54e06fa4..1979043b 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ObjectProvenanceProtoOrBuilder.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/ObjectProvenanceProtoOrBuilder.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; public interface ObjectProvenanceProtoOrBuilder extends @@ -72,14 +73,12 @@ boolean containsValues( /** * map<string, int32> values = 5; */ - int getValuesOrDefault( java.lang.String key, int defaultValue); /** * map<string, int32> values = 5; */ - int getValuesOrThrow( java.lang.String key); } diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/OlcutProto.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/OlcutProto.java index 6632a227..a4f198f8 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/OlcutProto.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/OlcutProto.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; public final class OlcutProto { @@ -174,7 +175,7 @@ public static void registerAllExtensions( internal_static_olcut_ComponentProto_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_olcut_ComponentProto_descriptor, - new java.lang.String[] { "Name", "Type", "Properties", "ListProperty", "MapProperty", "Override", "Exportable", "Importable", "LeaseTime", "Serialized", "Entries", "Type", "Override", "Exportable", "Importable", "LeaseTime", "Serialized", "Entries", }); + new java.lang.String[] { "Name", "Type", "Properties", "ListProperty", "MapProperty", "Override", "Exportable", "Importable", "LeaseTime", "Serialized", "Entries", }); internal_static_olcut_ComponentProto_PropertiesEntry_descriptor = internal_static_olcut_ComponentProto_descriptor.getNestedTypes().get(0); internal_static_olcut_ComponentProto_PropertiesEntry_fieldAccessorTable = new diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyListProto.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyListProto.java index 95878d8b..d6b0339d 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyListProto.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyListProto.java @@ -1,10 +1,12 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; /** *
+ *
  *A property list in a component.
  * 
* @@ -21,8 +23,10 @@ private PropertyListProto(com.google.protobuf.GeneratedMessageV3.Builder buil } private PropertyListProto() { name_ = ""; - item_ = com.google.protobuf.LazyStringArrayList.EMPTY; - type_ = com.google.protobuf.LazyStringArrayList.EMPTY; + item_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + type_ = + com.google.protobuf.LazyStringArrayList.emptyList(); } @java.lang.Override @@ -32,79 +36,6 @@ protected java.lang.Object newInstance( return new PropertyListProto(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PropertyListProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - item_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - item_.add(s); - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - type_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - type_.add(s); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - item_ = item_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - type_ = type_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.oracle.labs.mlrg.olcut.config.protobuf.protos.OlcutProto.internal_static_olcut_PropertyListProto_descriptor; @@ -119,7 +50,8 @@ private PropertyListProto( } public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 1; * @return The name. @@ -157,7 +89,9 @@ public java.lang.String getName() { } public static final int ITEM_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList item_; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList item_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** * repeated string item = 2; * @return A list containing the item. @@ -192,7 +126,9 @@ public java.lang.String getItem(int index) { } public static final int TYPE_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList type_; + @SuppressWarnings("serial") + private com.google.protobuf.LazyStringArrayList type_ = + com.google.protobuf.LazyStringArrayList.emptyList(); /** * repeated string type = 3; * @return A list containing the type. @@ -240,7 +176,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } for (int i = 0; i < item_.size(); i++) { @@ -249,7 +185,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < type_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, type_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -258,7 +194,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } { @@ -277,7 +213,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getTypeList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -298,7 +234,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getItemList())) return false; if (!getTypeList() .equals(other.getTypeList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +255,7 @@ public int hashCode() { hash = (37 * hash) + TYPE_FIELD_NUMBER; hash = (53 * hash) + getTypeList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -368,11 +304,13 @@ public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProt return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -416,6 +354,7 @@ protected Builder newBuilderForType( } /** *
+   *
    *A property list in a component.
    * 
* @@ -440,28 +379,23 @@ public static final class Builder extends // Construct using com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; - - item_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - type_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); + item_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + type_ = + com.google.protobuf.LazyStringArrayList.emptyList(); return this; } @@ -488,20 +422,24 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto build @java.lang.Override public com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto buildPartial() { com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto result = new com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto(this); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartial0(com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto result) { int from_bitField0_ = bitField0_; - result.name_ = name_; - if (((bitField0_ & 0x00000001) != 0)) { - item_ = item_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000001); + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; } - result.item_ = item_; - if (((bitField0_ & 0x00000002) != 0)) { - type_ = type_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); + if (((from_bitField0_ & 0x00000002) != 0)) { + item_.makeImmutable(); + result.item_ = item_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + type_.makeImmutable(); + result.type_ = type_; } - result.type_ = type_; - onBuilt(); - return result; } @java.lang.Override @@ -550,12 +488,13 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Prope if (other == com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.item_.isEmpty()) { if (item_.isEmpty()) { item_ = other.item_; - bitField0_ = (bitField0_ & ~0x00000001); + bitField0_ |= 0x00000002; } else { ensureItemIsMutable(); item_.addAll(other.item_); @@ -565,14 +504,14 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Prope if (!other.type_.isEmpty()) { if (type_.isEmpty()) { type_ = other.type_; - bitField0_ = (bitField0_ & ~0x00000002); + bitField0_ |= 0x00000004; } else { ensureTypeIsMutable(); type_.addAll(other.type_); } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -587,17 +526,47 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + java.lang.String s = input.readStringRequireUtf8(); + ensureItemIsMutable(); + item_.add(s); + break; + } // case 18 + case 26: { + java.lang.String s = input.readStringRequireUtf8(); + ensureTypeIsMutable(); + type_.add(s); + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyListProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -643,11 +612,9 @@ public java.lang.String getName() { */ public Builder setName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -656,8 +623,8 @@ public Builder setName( * @return This builder for chaining. */ public Builder clearName() { - name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -668,22 +635,21 @@ public Builder clearName() { */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } - private com.google.protobuf.LazyStringList item_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private com.google.protobuf.LazyStringArrayList item_ = + com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureItemIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { + if (!item_.isModifiable()) { item_ = new com.google.protobuf.LazyStringArrayList(item_); - bitField0_ |= 0x00000001; - } + } + bitField0_ |= 0x00000002; } /** * repeated string item = 2; @@ -691,7 +657,8 @@ private void ensureItemIsMutable() { */ public com.google.protobuf.ProtocolStringList getItemList() { - return item_.getUnmodifiableView(); + item_.makeImmutable(); + return item_; } /** * repeated string item = 2; @@ -725,11 +692,10 @@ public java.lang.String getItem(int index) { */ public Builder setItem( int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureItemIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureItemIsMutable(); item_.set(index, value); + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -740,11 +706,10 @@ public Builder setItem( */ public Builder addItem( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureItemIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureItemIsMutable(); item_.add(value); + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -758,6 +723,7 @@ public Builder addAllItem( ensureItemIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, item_); + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -766,8 +732,9 @@ public Builder addAllItem( * @return This builder for chaining. */ public Builder clearItem() { - item_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + item_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002);; onChanged(); return this; } @@ -778,22 +745,22 @@ public Builder clearItem() { */ public Builder addItemBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); ensureItemIsMutable(); item_.add(value); + bitField0_ |= 0x00000002; onChanged(); return this; } - private com.google.protobuf.LazyStringList type_ = com.google.protobuf.LazyStringArrayList.EMPTY; + private com.google.protobuf.LazyStringArrayList type_ = + com.google.protobuf.LazyStringArrayList.emptyList(); private void ensureTypeIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { + if (!type_.isModifiable()) { type_ = new com.google.protobuf.LazyStringArrayList(type_); - bitField0_ |= 0x00000002; - } + } + bitField0_ |= 0x00000004; } /** * repeated string type = 3; @@ -801,7 +768,8 @@ private void ensureTypeIsMutable() { */ public com.google.protobuf.ProtocolStringList getTypeList() { - return type_.getUnmodifiableView(); + type_.makeImmutable(); + return type_; } /** * repeated string type = 3; @@ -835,11 +803,10 @@ public java.lang.String getType(int index) { */ public Builder setType( int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypeIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureTypeIsMutable(); type_.set(index, value); + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -850,11 +817,10 @@ public Builder setType( */ public Builder addType( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureTypeIsMutable(); + if (value == null) { throw new NullPointerException(); } + ensureTypeIsMutable(); type_.add(value); + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -868,6 +834,7 @@ public Builder addAllType( ensureTypeIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll( values, type_); + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -876,8 +843,9 @@ public Builder addAllType( * @return This builder for chaining. */ public Builder clearType() { - type_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); + type_ = + com.google.protobuf.LazyStringArrayList.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004);; onChanged(); return this; } @@ -888,12 +856,11 @@ public Builder clearType() { */ public Builder addTypeBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); ensureTypeIsMutable(); type_.add(value); + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -930,7 +897,18 @@ public PropertyListProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PropertyListProto(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyListProtoOrBuilder.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyListProtoOrBuilder.java index 27c27bef..2aa9e51b 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyListProtoOrBuilder.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyListProtoOrBuilder.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; public interface PropertyListProtoOrBuilder extends diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyMapProto.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyMapProto.java index 9f9f780b..08da91e2 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyMapProto.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyMapProto.java @@ -1,10 +1,12 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; /** *
+ *
  *A property map in a component.
  * 
* @@ -30,68 +32,6 @@ protected java.lang.Object newInstance( return new PropertyMapProto(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private PropertyMapProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - elements_ = com.google.protobuf.MapField.newMapField( - ElementsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - elements__ = input.readMessage( - ElementsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - elements_.getMutableMap().put( - elements__.getKey(), elements__.getValue()); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.oracle.labs.mlrg.olcut.config.protobuf.protos.OlcutProto.internal_static_olcut_PropertyMapProto_descriptor; @@ -99,7 +39,7 @@ private PropertyMapProto( @SuppressWarnings({"rawtypes"}) @java.lang.Override - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 2: @@ -118,7 +58,8 @@ protected com.google.protobuf.MapField internalGetMapField( } public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 1; * @return The name. @@ -167,6 +108,7 @@ private static final class ElementsDefaultEntryHolder { com.google.protobuf.WireFormat.FieldType.STRING, ""); } + @SuppressWarnings("serial") private com.google.protobuf.MapField< java.lang.String, java.lang.String> elements_; private com.google.protobuf.MapField @@ -177,18 +119,16 @@ private static final class ElementsDefaultEntryHolder { } return elements_; } - public int getElementsCount() { return internalGetElements().getMap().size(); } /** * map<string, string> elements = 2; */ - @java.lang.Override public boolean containsElements( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } return internalGetElements().getMap().containsKey(key); } /** @@ -203,7 +143,6 @@ public java.util.Map getElements() { * map<string, string> elements = 2; */ @java.lang.Override - public java.util.Map getElementsMap() { return internalGetElements().getMap(); } @@ -211,11 +150,12 @@ public java.util.Map getElementsMap() { * map<string, string> elements = 2; */ @java.lang.Override - - public java.lang.String getElementsOrDefault( + public /* nullable */ +java.lang.String getElementsOrDefault( java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetElements().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -224,10 +164,9 @@ public java.lang.String getElementsOrDefault( * map<string, string> elements = 2; */ @java.lang.Override - public java.lang.String getElementsOrThrow( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetElements().getMap(); if (!map.containsKey(key)) { @@ -250,7 +189,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } com.google.protobuf.GeneratedMessageV3 @@ -259,7 +198,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) internalGetElements(), ElementsDefaultEntryHolder.defaultEntry, 2); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -268,7 +207,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } for (java.util.Map.Entry entry @@ -281,7 +220,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(2, elements__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getName())) return false; if (!internalGetElements().equals( other.internalGetElements())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -317,7 +256,7 @@ public int hashCode() { hash = (37 * hash) + ELEMENTS_FIELD_NUMBER; hash = (53 * hash) + internalGetElements().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -366,11 +305,13 @@ public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -414,6 +355,7 @@ protected Builder newBuilderForType( } /** *
+   *
    *A property map in a component.
    * 
* @@ -429,7 +371,7 @@ public static final class Builder extends } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection( int number) { switch (number) { case 2: @@ -440,7 +382,7 @@ protected com.google.protobuf.MapField internalGetMapField( } } @SuppressWarnings({"rawtypes"}) - protected com.google.protobuf.MapField internalGetMutableMapField( + protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection( int number) { switch (number) { case 2: @@ -460,24 +402,19 @@ protected com.google.protobuf.MapField internalGetMutableMapField( // Construct using com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; - internalGetMutableElements().clear(); return this; } @@ -505,14 +442,22 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto build( @java.lang.Override public com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto buildPartial() { com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto result = new com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto(this); - int from_bitField0_ = bitField0_; - result.name_ = name_; - result.elements_ = internalGetElements(); - result.elements_.makeImmutable(); + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartial0(com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.elements_ = internalGetElements(); + result.elements_.makeImmutable(); + } + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -559,11 +504,13 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Prope if (other == com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } internalGetMutableElements().mergeFrom( other.internalGetElements()); - this.mergeUnknownFields(other.unknownFields); + bitField0_ |= 0x00000002; + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -578,17 +525,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + com.google.protobuf.MapEntry + elements__ = input.readMessage( + ElementsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); + internalGetMutableElements().getMutableMap().put( + elements__.getKey(), elements__.getValue()); + bitField0_ |= 0x00000002; + break; + } // case 18 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.oracle.labs.mlrg.olcut.config.protobuf.protos.PropertyMapProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -634,11 +608,9 @@ public java.lang.String getName() { */ public Builder setName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -647,8 +619,8 @@ public Builder setName( * @return This builder for chaining. */ public Builder clearName() { - name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -659,12 +631,10 @@ public Builder clearName() { */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -672,7 +642,7 @@ public Builder setNameBytes( private com.google.protobuf.MapField< java.lang.String, java.lang.String> elements_; private com.google.protobuf.MapField - internalGetElements() { + internalGetElements() { if (elements_ == null) { return com.google.protobuf.MapField.emptyMapField( ElementsDefaultEntryHolder.defaultEntry); @@ -680,8 +650,7 @@ public Builder setNameBytes( return elements_; } private com.google.protobuf.MapField - internalGetMutableElements() { - onChanged();; + internalGetMutableElements() { if (elements_ == null) { elements_ = com.google.protobuf.MapField.newMapField( ElementsDefaultEntryHolder.defaultEntry); @@ -689,20 +658,20 @@ public Builder setNameBytes( if (!elements_.isMutable()) { elements_ = elements_.copy(); } + bitField0_ |= 0x00000002; + onChanged(); return elements_; } - public int getElementsCount() { return internalGetElements().getMap().size(); } /** * map<string, string> elements = 2; */ - @java.lang.Override public boolean containsElements( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } return internalGetElements().getMap().containsKey(key); } /** @@ -717,7 +686,6 @@ public java.util.Map getElements() { * map<string, string> elements = 2; */ @java.lang.Override - public java.util.Map getElementsMap() { return internalGetElements().getMap(); } @@ -725,11 +693,12 @@ public java.util.Map getElementsMap() { * map<string, string> elements = 2; */ @java.lang.Override - - public java.lang.String getElementsOrDefault( + public /* nullable */ +java.lang.String getElementsOrDefault( java.lang.String key, - java.lang.String defaultValue) { - if (key == null) { throw new java.lang.NullPointerException(); } + /* nullable */ +java.lang.String defaultValue) { + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetElements().getMap(); return map.containsKey(key) ? map.get(key) : defaultValue; @@ -738,10 +707,9 @@ public java.lang.String getElementsOrDefault( * map<string, string> elements = 2; */ @java.lang.Override - public java.lang.String getElementsOrThrow( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } java.util.Map map = internalGetElements().getMap(); if (!map.containsKey(key)) { @@ -749,8 +717,8 @@ public java.lang.String getElementsOrThrow( } return map.get(key); } - public Builder clearElements() { + bitField0_ = (bitField0_ & ~0x00000002); internalGetMutableElements().getMutableMap() .clear(); return this; @@ -758,10 +726,9 @@ public Builder clearElements() { /** * map<string, string> elements = 2; */ - public Builder removeElements( java.lang.String key) { - if (key == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } internalGetMutableElements().getMutableMap() .remove(key); return this; @@ -771,7 +738,8 @@ public Builder removeElements( */ @java.lang.Deprecated public java.util.Map - getMutableElements() { + getMutableElements() { + bitField0_ |= 0x00000002; return internalGetMutableElements().getMutableMap(); } /** @@ -780,20 +748,21 @@ public Builder removeElements( public Builder putElements( java.lang.String key, java.lang.String value) { - if (key == null) { throw new java.lang.NullPointerException(); } - if (value == null) { throw new java.lang.NullPointerException(); } + if (key == null) { throw new NullPointerException("map key"); } + if (value == null) { throw new NullPointerException("map value"); } internalGetMutableElements().getMutableMap() .put(key, value); + bitField0_ |= 0x00000002; return this; } /** * map<string, string> elements = 2; */ - public Builder putAllElements( java.util.Map values) { internalGetMutableElements().getMutableMap() .putAll(values); + bitField0_ |= 0x00000002; return this; } @java.lang.Override @@ -829,7 +798,18 @@ public PropertyMapProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PropertyMapProto(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyMapProtoOrBuilder.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyMapProtoOrBuilder.java index 010e8ade..84b387ab 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyMapProtoOrBuilder.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/PropertyMapProtoOrBuilder.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; public interface PropertyMapProtoOrBuilder extends @@ -42,14 +43,14 @@ boolean containsElements( /** * map<string, string> elements = 2; */ - - java.lang.String getElementsOrDefault( + /* nullable */ +java.lang.String getElementsOrDefault( java.lang.String key, - java.lang.String defaultValue); + /* nullable */ +java.lang.String defaultValue); /** * map<string, string> elements = 2; */ - java.lang.String getElementsOrThrow( java.lang.String key); } diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/RootProvenanceProto.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/RootProvenanceProto.java index 830a20af..cc933334 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/RootProvenanceProto.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/RootProvenanceProto.java @@ -1,10 +1,12 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; /** *
+ *
  *Root message for a list of marshalled provenances.
  * 
* @@ -33,97 +35,6 @@ protected java.lang.Object newInstance( return new RootProvenanceProto(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private RootProvenanceProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - omp_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - omp_.add( - input.readMessage(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto.parser(), extensionRegistry)); - break; - } - case 18: { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - smp_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - smp_.add( - input.readMessage(com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto.parser(), extensionRegistry)); - break; - } - case 26: { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - mmp_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - mmp_.add( - input.readMessage(com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto.parser(), extensionRegistry)); - break; - } - case 34: { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - lmp_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000008; - } - lmp_.add( - input.readMessage(com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.parser(), extensionRegistry)); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - omp_ = java.util.Collections.unmodifiableList(omp_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - smp_ = java.util.Collections.unmodifiableList(smp_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - mmp_ = java.util.Collections.unmodifiableList(mmp_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - lmp_ = java.util.Collections.unmodifiableList(lmp_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.oracle.labs.mlrg.olcut.config.protobuf.protos.OlcutProto.internal_static_olcut_RootProvenanceProto_descriptor; @@ -138,6 +49,7 @@ private RootProvenanceProto( } public static final int OMP_FIELD_NUMBER = 1; + @SuppressWarnings("serial") private java.util.List omp_; /** * repeated .olcut.ObjectProvenanceProto omp = 1; @@ -178,6 +90,7 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProtoOr } public static final int SMP_FIELD_NUMBER = 2; + @SuppressWarnings("serial") private java.util.List smp_; /** * repeated .olcut.SimpleProvenanceProto smp = 2; @@ -218,6 +131,7 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProtoOr } public static final int MMP_FIELD_NUMBER = 3; + @SuppressWarnings("serial") private java.util.List mmp_; /** * repeated .olcut.MapProvenanceProto mmp = 3; @@ -258,6 +172,7 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProtoOrBui } public static final int LMP_FIELD_NUMBER = 4; + @SuppressWarnings("serial") private java.util.List lmp_; /** * repeated .olcut.ListProvenanceProto lmp = 4; @@ -323,7 +238,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) for (int i = 0; i < lmp_.size(); i++) { output.writeMessage(4, lmp_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -348,7 +263,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeMessageSize(4, lmp_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -371,7 +286,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getMmpList())) return false; if (!getLmpList() .equals(other.getLmpList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -398,7 +313,7 @@ public int hashCode() { hash = (37 * hash) + LMP_FIELD_NUMBER; hash = (53 * hash) + getLmpList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -447,11 +362,13 @@ public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenancePr return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -495,6 +412,7 @@ protected Builder newBuilderForType( } /** *
+   *
    *Root message for a list of marshalled provenances.
    * 
* @@ -519,50 +437,46 @@ public static final class Builder extends // Construct using com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - getOmpFieldBuilder(); - getSmpFieldBuilder(); - getMmpFieldBuilder(); - getLmpFieldBuilder(); - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; if (ompBuilder_ == null) { omp_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + omp_ = null; ompBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (smpBuilder_ == null) { smp_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + smp_ = null; smpBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (mmpBuilder_ == null) { mmp_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); } else { + mmp_ = null; mmpBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000004); if (lmpBuilder_ == null) { lmp_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + lmp_ = null; lmpBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -589,7 +503,13 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto bui @java.lang.Override public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto buildPartial() { com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto result = new com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto(this); - int from_bitField0_ = bitField0_; + buildPartialRepeatedFields(result); + if (bitField0_ != 0) { buildPartial0(result); } + onBuilt(); + return result; + } + + private void buildPartialRepeatedFields(com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto result) { if (ompBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { omp_ = java.util.Collections.unmodifiableList(omp_); @@ -626,8 +546,10 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto bui } else { result.lmp_ = lmpBuilder_.build(); } - onBuilt(); - return result; + } + + private void buildPartial0(com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto result) { + int from_bitField0_ = bitField0_; } @java.lang.Override @@ -778,7 +700,7 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootP } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -793,17 +715,82 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto m = + input.readMessage( + com.oracle.labs.mlrg.olcut.config.protobuf.protos.ObjectProvenanceProto.parser(), + extensionRegistry); + if (ompBuilder_ == null) { + ensureOmpIsMutable(); + omp_.add(m); + } else { + ompBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: { + com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto m = + input.readMessage( + com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto.parser(), + extensionRegistry); + if (smpBuilder_ == null) { + ensureSmpIsMutable(); + smp_.add(m); + } else { + smpBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: { + com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto m = + input.readMessage( + com.oracle.labs.mlrg.olcut.config.protobuf.protos.MapProvenanceProto.parser(), + extensionRegistry); + if (mmpBuilder_ == null) { + ensureMmpIsMutable(); + mmp_.add(m); + } else { + mmpBuilder_.addMessage(m); + } + break; + } // case 26 + case 34: { + com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto m = + input.readMessage( + com.oracle.labs.mlrg.olcut.config.protobuf.protos.ListProvenanceProto.parser(), + extensionRegistry); + if (lmpBuilder_ == null) { + ensureLmpIsMutable(); + lmp_.add(m); + } else { + lmpBuilder_.addMessage(m); + } + break; + } // case 34 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.oracle.labs.mlrg.olcut.config.protobuf.protos.RootProvenanceProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } private int bitField0_; @@ -1800,7 +1787,18 @@ public RootProvenanceProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RootProvenanceProto(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/RootProvenanceProtoOrBuilder.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/RootProvenanceProtoOrBuilder.java index e347b5a4..21e9f299 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/RootProvenanceProtoOrBuilder.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/RootProvenanceProtoOrBuilder.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; public interface RootProvenanceProtoOrBuilder extends diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SerializedObjectProto.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SerializedObjectProto.java index c5678816..a5ce7e64 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SerializedObjectProto.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SerializedObjectProto.java @@ -1,10 +1,12 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; /** *
+ *
  *A reference to a serialized object on disk.
  * 
* @@ -32,66 +34,6 @@ protected java.lang.Object newInstance( return new SerializedObjectProto(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SerializedObjectProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: { - java.lang.String s = input.readStringRequireUtf8(); - - name_ = s; - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - location_ = s; - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.oracle.labs.mlrg.olcut.config.protobuf.protos.OlcutProto.internal_static_olcut_SerializedObjectProto_descriptor; @@ -106,7 +48,8 @@ private SerializedObjectProto( } public static final int NAME_FIELD_NUMBER = 1; - private volatile java.lang.Object name_; + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; /** * string name = 1; * @return The name. @@ -144,7 +87,8 @@ public java.lang.String getName() { } public static final int TYPE_FIELD_NUMBER = 2; - private volatile java.lang.Object type_; + @SuppressWarnings("serial") + private volatile java.lang.Object type_ = ""; /** * string type = 2; * @return The type. @@ -182,7 +126,8 @@ public java.lang.String getType() { } public static final int LOCATION_FIELD_NUMBER = 3; - private volatile java.lang.Object location_; + @SuppressWarnings("serial") + private volatile java.lang.Object location_ = ""; /** * string location = 3; * @return The location. @@ -233,16 +178,16 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - if (!getTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, type_); } - if (!getLocationBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, location_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -251,16 +196,16 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (!getNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - if (!getTypeBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, type_); } - if (!getLocationBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(location_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, location_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -281,7 +226,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getType())) return false; if (!getLocation() .equals(other.getLocation())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -298,7 +243,7 @@ public int hashCode() { hash = (53 * hash) + getType().hashCode(); hash = (37 * hash) + LOCATION_FIELD_NUMBER; hash = (53 * hash) + getLocation().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -347,11 +292,13 @@ public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObject return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -395,6 +342,7 @@ protected Builder newBuilderForType( } /** *
+   *
    *A reference to a serialized object on disk.
    * 
* @@ -419,28 +367,21 @@ public static final class Builder extends // Construct using com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; name_ = ""; - type_ = ""; - location_ = ""; - return this; } @@ -467,13 +408,24 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto b @java.lang.Override public com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto buildPartial() { com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto result = new com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto(this); - result.name_ = name_; - result.type_ = type_; - result.location_ = location_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartial0(com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.name_ = name_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.type_ = type_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.location_ = location_; + } + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -520,17 +472,20 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Seria if (other == com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto.getDefaultInstance()) return this; if (!other.getName().isEmpty()) { name_ = other.name_; + bitField0_ |= 0x00000001; onChanged(); } if (!other.getType().isEmpty()) { type_ = other.type_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getLocation().isEmpty()) { location_ = other.location_; + bitField0_ |= 0x00000004; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -545,19 +500,48 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: { + name_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000001; + break; + } // case 10 + case 18: { + type_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + location_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.oracle.labs.mlrg.olcut.config.protobuf.protos.SerializedObjectProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private java.lang.Object name_ = ""; /** @@ -600,11 +584,9 @@ public java.lang.String getName() { */ public Builder setName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -613,8 +595,8 @@ public Builder setName( * @return This builder for chaining. */ public Builder clearName() { - name_ = getDefaultInstance().getName(); + bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } @@ -625,12 +607,10 @@ public Builder clearName() { */ public Builder setNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); name_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -676,11 +656,9 @@ public java.lang.String getType() { */ public Builder setType( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } type_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -689,8 +667,8 @@ public Builder setType( * @return This builder for chaining. */ public Builder clearType() { - type_ = getDefaultInstance().getType(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -701,12 +679,10 @@ public Builder clearType() { */ public Builder setTypeBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); type_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -752,11 +728,9 @@ public java.lang.String getLocation() { */ public Builder setLocation( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } location_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -765,8 +739,8 @@ public Builder setLocation( * @return This builder for chaining. */ public Builder clearLocation() { - location_ = getDefaultInstance().getLocation(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -777,12 +751,10 @@ public Builder clearLocation() { */ public Builder setLocationBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); location_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -819,7 +791,18 @@ public SerializedObjectProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SerializedObjectProto(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SerializedObjectProtoOrBuilder.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SerializedObjectProtoOrBuilder.java index 94c1659b..4705f8f8 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SerializedObjectProtoOrBuilder.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SerializedObjectProtoOrBuilder.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; public interface SerializedObjectProtoOrBuilder extends diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SimpleProvenanceProto.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SimpleProvenanceProto.java index 039ef0fb..5323ed0a 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SimpleProvenanceProto.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SimpleProvenanceProto.java @@ -1,10 +1,12 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; /** *
+ *
  *A SimpleMarshalledProvenance proto.
  * 
* @@ -33,82 +35,6 @@ protected java.lang.Object newInstance( return new SimpleProvenanceProto(); } - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet - getUnknownFields() { - return this.unknownFields; - } - private SimpleProvenanceProto( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: { - - index_ = input.readInt32(); - break; - } - case 18: { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - case 26: { - java.lang.String s = input.readStringRequireUtf8(); - - value_ = s; - break; - } - case 34: { - java.lang.String s = input.readStringRequireUtf8(); - - additional_ = s; - break; - } - case 42: { - java.lang.String s = input.readStringRequireUtf8(); - - provenanceClassName_ = s; - break; - } - case 48: { - - isReference_ = input.readBool(); - break; - } - default: { - if (!parseUnknownField( - input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException( - e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.oracle.labs.mlrg.olcut.config.protobuf.protos.OlcutProto.internal_static_olcut_SimpleProvenanceProto_descriptor; @@ -123,7 +49,7 @@ private SimpleProvenanceProto( } public static final int INDEX_FIELD_NUMBER = 1; - private int index_; + private int index_ = 0; /** * int32 index = 1; * @return The index. @@ -134,7 +60,8 @@ public int getIndex() { } public static final int KEY_FIELD_NUMBER = 2; - private volatile java.lang.Object key_; + @SuppressWarnings("serial") + private volatile java.lang.Object key_ = ""; /** * string key = 2; * @return The key. @@ -172,7 +99,8 @@ public java.lang.String getKey() { } public static final int VALUE_FIELD_NUMBER = 3; - private volatile java.lang.Object value_; + @SuppressWarnings("serial") + private volatile java.lang.Object value_ = ""; /** * string value = 3; * @return The value. @@ -210,7 +138,8 @@ public java.lang.String getValue() { } public static final int ADDITIONAL_FIELD_NUMBER = 4; - private volatile java.lang.Object additional_; + @SuppressWarnings("serial") + private volatile java.lang.Object additional_ = ""; /** * string additional = 4; * @return The additional. @@ -248,7 +177,8 @@ public java.lang.String getAdditional() { } public static final int PROVENANCE_CLASS_NAME_FIELD_NUMBER = 5; - private volatile java.lang.Object provenanceClassName_; + @SuppressWarnings("serial") + private volatile java.lang.Object provenanceClassName_ = ""; /** * string provenance_class_name = 5; * @return The provenanceClassName. @@ -286,7 +216,7 @@ public java.lang.String getProvenanceClassName() { } public static final int IS_REFERENCE_FIELD_NUMBER = 6; - private boolean isReference_; + private boolean isReference_ = false; /** * bool is_reference = 6; * @return The isReference. @@ -313,22 +243,22 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) if (index_ != 0) { output.writeInt32(1, index_); } - if (!getKeyBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, key_); } - if (!getValueBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, value_); } - if (!getAdditionalBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(additional_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, additional_); } - if (!getProvenanceClassNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceClassName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, provenanceClassName_); } if (isReference_ != false) { output.writeBool(6, isReference_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -341,23 +271,23 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream .computeInt32Size(1, index_); } - if (!getKeyBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, key_); } - if (!getValueBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(value_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, value_); } - if (!getAdditionalBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(additional_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, additional_); } - if (!getProvenanceClassNameBytes().isEmpty()) { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(provenanceClassName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, provenanceClassName_); } if (isReference_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(6, isReference_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -384,7 +314,7 @@ public boolean equals(final java.lang.Object obj) { .equals(other.getProvenanceClassName())) return false; if (getIsReference() != other.getIsReference()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -408,7 +338,7 @@ public int hashCode() { hash = (37 * hash) + IS_REFERENCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getIsReference()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -457,11 +387,13 @@ public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenance return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input, extensionRegistry); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } + public static com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) @@ -505,6 +437,7 @@ protected Builder newBuilderForType( } /** *
+   *
    *A SimpleMarshalledProvenance proto.
    * 
* @@ -529,34 +462,24 @@ public static final class Builder extends // Construct using com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto.newBuilder() private Builder() { - maybeForceBuilderInitialization(); + } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3 - .alwaysUseFieldBuilders) { - } + } @java.lang.Override public Builder clear() { super.clear(); + bitField0_ = 0; index_ = 0; - key_ = ""; - value_ = ""; - additional_ = ""; - provenanceClassName_ = ""; - isReference_ = false; - return this; } @@ -583,16 +506,33 @@ public com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto b @java.lang.Override public com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto buildPartial() { com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto result = new com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto(this); - result.index_ = index_; - result.key_ = key_; - result.value_ = value_; - result.additional_ = additional_; - result.provenanceClassName_ = provenanceClassName_; - result.isReference_ = isReference_; + if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } + private void buildPartial0(com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto result) { + int from_bitField0_ = bitField0_; + if (((from_bitField0_ & 0x00000001) != 0)) { + result.index_ = index_; + } + if (((from_bitField0_ & 0x00000002) != 0)) { + result.key_ = key_; + } + if (((from_bitField0_ & 0x00000004) != 0)) { + result.value_ = value_; + } + if (((from_bitField0_ & 0x00000008) != 0)) { + result.additional_ = additional_; + } + if (((from_bitField0_ & 0x00000010) != 0)) { + result.provenanceClassName_ = provenanceClassName_; + } + if (((from_bitField0_ & 0x00000020) != 0)) { + result.isReference_ = isReference_; + } + } + @java.lang.Override public Builder clone() { return super.clone(); @@ -642,24 +582,28 @@ public Builder mergeFrom(com.oracle.labs.mlrg.olcut.config.protobuf.protos.Simpl } if (!other.getKey().isEmpty()) { key_ = other.key_; + bitField0_ |= 0x00000002; onChanged(); } if (!other.getValue().isEmpty()) { value_ = other.value_; + bitField0_ |= 0x00000004; onChanged(); } if (!other.getAdditional().isEmpty()) { additional_ = other.additional_; + bitField0_ |= 0x00000008; onChanged(); } if (!other.getProvenanceClassName().isEmpty()) { provenanceClassName_ = other.provenanceClassName_; + bitField0_ |= 0x00000010; onChanged(); } if (other.getIsReference() != false) { setIsReference(other.getIsReference()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -674,19 +618,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: { + index_ = input.readInt32(); + bitField0_ |= 0x00000001; + break; + } // case 8 + case 18: { + key_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000002; + break; + } // case 18 + case 26: { + value_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000004; + break; + } // case 26 + case 34: { + additional_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000008; + break; + } // case 34 + case 42: { + provenanceClassName_ = input.readStringRequireUtf8(); + bitField0_ |= 0x00000010; + break; + } // case 42 + case 48: { + isReference_ = input.readBool(); + bitField0_ |= 0x00000020; + break; + } // case 48 + default: { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.oracle.labs.mlrg.olcut.config.protobuf.protos.SimpleProvenanceProto) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } + private int bitField0_; private int index_ ; /** @@ -703,8 +691,9 @@ public int getIndex() { * @return This builder for chaining. */ public Builder setIndex(int value) { - + index_ = value; + bitField0_ |= 0x00000001; onChanged(); return this; } @@ -713,7 +702,7 @@ public Builder setIndex(int value) { * @return This builder for chaining. */ public Builder clearIndex() { - + bitField0_ = (bitField0_ & ~0x00000001); index_ = 0; onChanged(); return this; @@ -760,11 +749,9 @@ public java.lang.String getKey() { */ public Builder setKey( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } key_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -773,8 +760,8 @@ public Builder setKey( * @return This builder for chaining. */ public Builder clearKey() { - key_ = getDefaultInstance().getKey(); + bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } @@ -785,12 +772,10 @@ public Builder clearKey() { */ public Builder setKeyBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); key_ = value; + bitField0_ |= 0x00000002; onChanged(); return this; } @@ -836,11 +821,9 @@ public java.lang.String getValue() { */ public Builder setValue( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } value_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -849,8 +832,8 @@ public Builder setValue( * @return This builder for chaining. */ public Builder clearValue() { - value_ = getDefaultInstance().getValue(); + bitField0_ = (bitField0_ & ~0x00000004); onChanged(); return this; } @@ -861,12 +844,10 @@ public Builder clearValue() { */ public Builder setValueBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); value_ = value; + bitField0_ |= 0x00000004; onChanged(); return this; } @@ -912,11 +893,9 @@ public java.lang.String getAdditional() { */ public Builder setAdditional( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } additional_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -925,8 +904,8 @@ public Builder setAdditional( * @return This builder for chaining. */ public Builder clearAdditional() { - additional_ = getDefaultInstance().getAdditional(); + bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; } @@ -937,12 +916,10 @@ public Builder clearAdditional() { */ public Builder setAdditionalBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); additional_ = value; + bitField0_ |= 0x00000008; onChanged(); return this; } @@ -988,11 +965,9 @@ public java.lang.String getProvenanceClassName() { */ public Builder setProvenanceClassName( java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - + if (value == null) { throw new NullPointerException(); } provenanceClassName_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1001,8 +976,8 @@ public Builder setProvenanceClassName( * @return This builder for chaining. */ public Builder clearProvenanceClassName() { - provenanceClassName_ = getDefaultInstance().getProvenanceClassName(); + bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } @@ -1013,12 +988,10 @@ public Builder clearProvenanceClassName() { */ public Builder setProvenanceClassNameBytes( com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - + if (value == null) { throw new NullPointerException(); } + checkByteStringIsUtf8(value); provenanceClassName_ = value; + bitField0_ |= 0x00000010; onChanged(); return this; } @@ -1038,8 +1011,9 @@ public boolean getIsReference() { * @return This builder for chaining. */ public Builder setIsReference(boolean value) { - + isReference_ = value; + bitField0_ |= 0x00000020; onChanged(); return this; } @@ -1048,7 +1022,7 @@ public Builder setIsReference(boolean value) { * @return This builder for chaining. */ public Builder clearIsReference() { - + bitField0_ = (bitField0_ & ~0x00000020); isReference_ = false; onChanged(); return this; @@ -1086,7 +1060,18 @@ public SimpleProvenanceProto parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SimpleProvenanceProto(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SimpleProvenanceProtoOrBuilder.java b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SimpleProvenanceProtoOrBuilder.java index e190fbf6..414ff366 100644 --- a/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SimpleProvenanceProtoOrBuilder.java +++ b/olcut-config-protobuf/src/main/java/com/oracle/labs/mlrg/olcut/config/protobuf/protos/SimpleProvenanceProtoOrBuilder.java @@ -1,6 +1,7 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: olcut_proto.proto +// Protobuf Java Version: 3.25.5 package com.oracle.labs.mlrg.olcut.config.protobuf.protos; public interface SimpleProvenanceProtoOrBuilder extends diff --git a/olcut-extras/pom.xml b/olcut-extras/pom.xml index cffcfa32..eec6fead 100644 --- a/olcut-extras/pom.xml +++ b/olcut-extras/pom.xml @@ -11,7 +11,7 @@ - 9.4 + 9.7.1 olcut-extras diff --git a/pom.xml b/pom.xml index d5cc791a..9e0e1e7d 100644 --- a/pom.xml +++ b/pom.xml @@ -40,11 +40,11 @@ 1.8 1.8 0.7.1 - 2.14.1 - 2.14.1 - 3.22.0 - 5.9.2 - 3.19.6 + 2.18.0 + 2.18.0 + 3.27.1 + 5.11.3 + 3.25.5 olcut-core