From 83f4bbfcc4b4ca9404dd6cd5a7888eb48e961a5f Mon Sep 17 00:00:00 2001 From: Christophe Le Saec Date: Mon, 10 Jul 2023 08:28:19 +0200 Subject: [PATCH] AVRO-2918: add Apache license --- .../org/apache/avro/FooBarSpecificRecord.java | 100 +++++++++++------- .../apache/avro/specific/TestUnionRecord.java | 52 ++++++--- 2 files changed, 94 insertions(+), 58 deletions(-) diff --git a/lang/java/avro/src/test/java/org/apache/avro/FooBarSpecificRecord.java b/lang/java/avro/src/test/java/org/apache/avro/FooBarSpecificRecord.java index 7a6b2a1557a..7dab6716e31 100644 --- a/lang/java/avro/src/test/java/org/apache/avro/FooBarSpecificRecord.java +++ b/lang/java/avro/src/test/java/org/apache/avro/FooBarSpecificRecord.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ /** * Autogenerated by Avro * @@ -36,7 +54,7 @@ public static final class InternalCoders { /** * Return the BinaryMessageEncoder instance used by this class. - * + * * @return the message encoder used by this class */ public BinaryMessageEncoder getEncoder() { @@ -45,7 +63,7 @@ public BinaryMessageEncoder getEncoder() { /** * Return the BinaryMessageDecoder instance used by this class. - * + * * @return the message decoder used by this class */ public BinaryMessageDecoder getDecoder() { @@ -55,7 +73,7 @@ public BinaryMessageDecoder getDecoder() { /** * Create a new BinaryMessageDecoder instance for this class that uses the * specified {@link SchemaStore}. - * + * * @param resolver a {@link SchemaStore} used to find schemas by fingerprint * @return a BinaryMessageDecoder instance for this class backed by the given * SchemaStore @@ -66,7 +84,7 @@ public BinaryMessageDecoder createDecoder(SchemaStore reso /** * Deserializes a FooBarSpecificRecord from a ByteBuffer. - * + * * @param b a byte buffer holding serialized data for an instance of this class * @return a FooBarSpecificRecord instance decoded from the given buffer * @throws java.io.IOException if the given bytes could not be deserialized into @@ -81,7 +99,7 @@ public FooBarSpecificRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io /** * Serializes this FooBarSpecificRecord to a ByteBuffer. - * + * * @return a buffer holding the serialized data for this instance * @throws java.io.IOException if this instance could not be serialized */ @@ -105,7 +123,7 @@ public FooBarSpecificRecord() { /** * All-args constructor. - * + * * @param id The new value for id * @param name The new value for name * @param nicknames The new value for nicknames @@ -178,7 +196,7 @@ public void put(int field$, java.lang.Object value$) { /** * Gets the value of the 'id' field. - * + * * @return The value of the 'id' field. */ public int getId() { @@ -187,7 +205,7 @@ public int getId() { /** * Sets the value of the 'id' field. - * + * * @param value the value to set. */ public void setId(int value) { @@ -196,7 +214,7 @@ public void setId(int value) { /** * Gets the value of the 'name' field. - * + * * @return The value of the 'name' field. */ public java.lang.CharSequence getName() { @@ -205,7 +223,7 @@ public java.lang.CharSequence getName() { /** * Sets the value of the 'name' field. - * + * * @param value the value to set. */ public void setName(java.lang.CharSequence value) { @@ -214,7 +232,7 @@ public void setName(java.lang.CharSequence value) { /** * Gets the value of the 'nicknames' field. - * + * * @return The value of the 'nicknames' field. */ public java.util.List getNicknames() { @@ -223,7 +241,7 @@ public java.util.List getNicknames() { /** * Sets the value of the 'nicknames' field. - * + * * @param value the value to set. */ public void setNicknames(java.util.List value) { @@ -232,7 +250,7 @@ public void setNicknames(java.util.List value) { /** * Gets the value of the 'relatedids' field. - * + * * @return The value of the 'relatedids' field. */ public java.util.List getRelatedids() { @@ -241,7 +259,7 @@ public java.util.List getRelatedids() { /** * Sets the value of the 'relatedids' field. - * + * * @param value the value to set. */ public void setRelatedids(java.util.List value) { @@ -250,7 +268,7 @@ public void setRelatedids(java.util.List value) { /** * Gets the value of the 'typeEnum' field. - * + * * @return The value of the 'typeEnum' field. */ public org.apache.avro.TypeEnum getTypeEnum() { @@ -259,7 +277,7 @@ public org.apache.avro.TypeEnum getTypeEnum() { /** * Sets the value of the 'typeEnum' field. - * + * * @param value the value to set. */ public void setTypeEnum(org.apache.avro.TypeEnum value) { @@ -268,7 +286,7 @@ public void setTypeEnum(org.apache.avro.TypeEnum value) { /** * Creates a new FooBarSpecificRecord RecordBuilder. - * + * * @return A new FooBarSpecificRecord RecordBuilder */ public static org.apache.avro.FooBarSpecificRecord.Builder newBuilder() { @@ -278,7 +296,7 @@ public static org.apache.avro.FooBarSpecificRecord.Builder newBuilder() { /** * Creates a new FooBarSpecificRecord RecordBuilder by copying an existing * Builder. - * + * * @param other The existing builder to copy. * @return A new FooBarSpecificRecord RecordBuilder */ @@ -294,7 +312,7 @@ public static org.apache.avro.FooBarSpecificRecord.Builder newBuilder( /** * Creates a new FooBarSpecificRecord RecordBuilder by copying an existing * FooBarSpecificRecord instance. - * + * * @param other The existing instance to copy. * @return A new FooBarSpecificRecord RecordBuilder */ @@ -326,7 +344,7 @@ private Builder() { /** * Creates a Builder by copying an existing Builder. - * + * * @param other The existing Builder to copy. */ private Builder(org.apache.avro.FooBarSpecificRecord.Builder other) { @@ -355,7 +373,7 @@ private Builder(org.apache.avro.FooBarSpecificRecord.Builder other) { /** * Creates a Builder by copying an existing FooBarSpecificRecord instance - * + * * @param other The existing instance to copy. */ private Builder(org.apache.avro.FooBarSpecificRecord other) { @@ -384,7 +402,7 @@ private Builder(org.apache.avro.FooBarSpecificRecord other) { /** * Gets the value of the 'id' field. - * + * * @return The value. */ public int getId() { @@ -393,7 +411,7 @@ public int getId() { /** * Sets the value of the 'id' field. - * + * * @param value The value of 'id'. * @return This builder. */ @@ -406,7 +424,7 @@ public org.apache.avro.FooBarSpecificRecord.Builder setId(int value) { /** * Checks whether the 'id' field has been set. - * + * * @return True if the 'id' field has been set, false otherwise. */ public boolean hasId() { @@ -415,7 +433,7 @@ public boolean hasId() { /** * Clears the value of the 'id' field. - * + * * @return This builder. */ public org.apache.avro.FooBarSpecificRecord.Builder clearId() { @@ -425,7 +443,7 @@ public org.apache.avro.FooBarSpecificRecord.Builder clearId() { /** * Gets the value of the 'name' field. - * + * * @return The value. */ public java.lang.CharSequence getName() { @@ -434,7 +452,7 @@ public java.lang.CharSequence getName() { /** * Sets the value of the 'name' field. - * + * * @param value The value of 'name'. * @return This builder. */ @@ -447,7 +465,7 @@ public org.apache.avro.FooBarSpecificRecord.Builder setName(java.lang.CharSequen /** * Checks whether the 'name' field has been set. - * + * * @return True if the 'name' field has been set, false otherwise. */ public boolean hasName() { @@ -456,7 +474,7 @@ public boolean hasName() { /** * Clears the value of the 'name' field. - * + * * @return This builder. */ public org.apache.avro.FooBarSpecificRecord.Builder clearName() { @@ -467,7 +485,7 @@ public org.apache.avro.FooBarSpecificRecord.Builder clearName() { /** * Gets the value of the 'nicknames' field. - * + * * @return The value. */ public java.util.List getNicknames() { @@ -476,7 +494,7 @@ public java.util.List getNicknames() { /** * Sets the value of the 'nicknames' field. - * + * * @param value The value of 'nicknames'. * @return This builder. */ @@ -489,7 +507,7 @@ public org.apache.avro.FooBarSpecificRecord.Builder setNicknames(java.util.List< /** * Checks whether the 'nicknames' field has been set. - * + * * @return True if the 'nicknames' field has been set, false otherwise. */ public boolean hasNicknames() { @@ -498,7 +516,7 @@ public boolean hasNicknames() { /** * Clears the value of the 'nicknames' field. - * + * * @return This builder. */ public org.apache.avro.FooBarSpecificRecord.Builder clearNicknames() { @@ -509,7 +527,7 @@ public org.apache.avro.FooBarSpecificRecord.Builder clearNicknames() { /** * Gets the value of the 'relatedids' field. - * + * * @return The value. */ public java.util.List getRelatedids() { @@ -518,7 +536,7 @@ public java.util.List getRelatedids() { /** * Sets the value of the 'relatedids' field. - * + * * @param value The value of 'relatedids'. * @return This builder. */ @@ -531,7 +549,7 @@ public org.apache.avro.FooBarSpecificRecord.Builder setRelatedids(java.util.List /** * Checks whether the 'relatedids' field has been set. - * + * * @return True if the 'relatedids' field has been set, false otherwise. */ public boolean hasRelatedids() { @@ -540,7 +558,7 @@ public boolean hasRelatedids() { /** * Clears the value of the 'relatedids' field. - * + * * @return This builder. */ public org.apache.avro.FooBarSpecificRecord.Builder clearRelatedids() { @@ -551,7 +569,7 @@ public org.apache.avro.FooBarSpecificRecord.Builder clearRelatedids() { /** * Gets the value of the 'typeEnum' field. - * + * * @return The value. */ public org.apache.avro.TypeEnum getTypeEnum() { @@ -560,7 +578,7 @@ public org.apache.avro.TypeEnum getTypeEnum() { /** * Sets the value of the 'typeEnum' field. - * + * * @param value The value of 'typeEnum'. * @return This builder. */ @@ -573,7 +591,7 @@ public org.apache.avro.FooBarSpecificRecord.Builder setTypeEnum(org.apache.avro. /** * Checks whether the 'typeEnum' field has been set. - * + * * @return True if the 'typeEnum' field has been set, false otherwise. */ public boolean hasTypeEnum() { @@ -582,7 +600,7 @@ public boolean hasTypeEnum() { /** * Clears the value of the 'typeEnum' field. - * + * * @return This builder. */ public org.apache.avro.FooBarSpecificRecord.Builder clearTypeEnum() { diff --git a/lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java b/lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java index 4edbda54bef..db3e0fa6f40 100644 --- a/lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java +++ b/lang/java/avro/src/test/java/org/apache/avro/specific/TestUnionRecord.java @@ -1,3 +1,21 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ /** * Autogenerated by Avro * @@ -35,7 +53,7 @@ public InternalCoders() { /** * Return the BinaryMessageEncoder instance used by this class. - * + * * @return the message encoder used by this class */ public BinaryMessageEncoder getEncoder() { @@ -44,7 +62,7 @@ public BinaryMessageEncoder getEncoder() { /** * Return the BinaryMessageDecoder instance used by this class. - * + * * @return the message decoder used by this class */ public BinaryMessageDecoder getDecoder() { @@ -54,7 +72,7 @@ public BinaryMessageDecoder getDecoder() { /** * Create a new BinaryMessageDecoder instance for this class that uses the * specified {@link SchemaStore}. - * + * * @param resolver a {@link SchemaStore} used to find schemas by fingerprint * @return a BinaryMessageDecoder instance for this class backed by the given * SchemaStore @@ -65,7 +83,7 @@ public BinaryMessageDecoder createDecoder(SchemaStore resolver) /** * Deserializes a TestUnionRecord from a ByteBuffer. - * + * * @param b a byte buffer holding serialized data for an instance of this class * @return a TestUnionRecord instance decoded from the given buffer * @throws java.io.IOException if the given bytes could not be deserialized into @@ -80,7 +98,7 @@ public TestUnionRecord fromByteBuffer(java.nio.ByteBuffer b) throws java.io.IOEx /** * Serializes this TestUnionRecord to a ByteBuffer. - * + * * @return a buffer holding the serialized data for this instance * @throws java.io.IOException if this instance could not be serialized */ @@ -100,7 +118,7 @@ public TestUnionRecord() { /** * All-args constructor. - * + * * @param amount The new value for amount */ public TestUnionRecord(java.math.BigDecimal amount) { @@ -144,7 +162,7 @@ public void put(int field$, java.lang.Object value$) { /** * Gets the value of the 'amount' field. - * + * * @return The value of the 'amount' field. */ public java.math.BigDecimal getAmount() { @@ -153,7 +171,7 @@ public java.math.BigDecimal getAmount() { /** * Sets the value of the 'amount' field. - * + * * @param value the value to set. */ public void setAmount(java.math.BigDecimal value) { @@ -162,7 +180,7 @@ public void setAmount(java.math.BigDecimal value) { /** * Creates a new TestUnionRecord RecordBuilder. - * + * * @return A new TestUnionRecord RecordBuilder */ public static org.apache.avro.specific.TestUnionRecord.Builder newBuilderTestUnionRecord() { @@ -171,7 +189,7 @@ public static org.apache.avro.specific.TestUnionRecord.Builder newBuilderTestUni /** * Creates a new TestUnionRecord RecordBuilder by copying an existing Builder. - * + * * @param other The existing builder to copy. * @return A new TestUnionRecord RecordBuilder */ @@ -187,7 +205,7 @@ public static org.apache.avro.specific.TestUnionRecord.Builder newBuilder( /** * Creates a new TestUnionRecord RecordBuilder by copying an existing * TestUnionRecord instance. - * + * * @param other The existing instance to copy. * @return A new TestUnionRecord RecordBuilder */ @@ -216,7 +234,7 @@ private Builder() { /** * Creates a Builder by copying an existing Builder. - * + * * @param other The existing Builder to copy. */ private Builder(org.apache.avro.specific.TestUnionRecord.Builder other) { @@ -229,7 +247,7 @@ private Builder(org.apache.avro.specific.TestUnionRecord.Builder other) { /** * Creates a Builder by copying an existing TestUnionRecord instance - * + * * @param other The existing instance to copy. */ private Builder(org.apache.avro.specific.TestUnionRecord other) { @@ -242,7 +260,7 @@ private Builder(org.apache.avro.specific.TestUnionRecord other) { /** * Gets the value of the 'amount' field. - * + * * @return The value. */ public java.math.BigDecimal getAmount() { @@ -251,7 +269,7 @@ public java.math.BigDecimal getAmount() { /** * Sets the value of the 'amount' field. - * + * * @param value The value of 'amount'. * @return This builder. */ @@ -264,7 +282,7 @@ public org.apache.avro.specific.TestUnionRecord.Builder setAmount(java.math.BigD /** * Checks whether the 'amount' field has been set. - * + * * @return True if the 'amount' field has been set, false otherwise. */ public boolean hasAmount() { @@ -273,7 +291,7 @@ public boolean hasAmount() { /** * Clears the value of the 'amount' field. - * + * * @return This builder. */ public org.apache.avro.specific.TestUnionRecord.Builder clearAmount() {