From 82baa76395ab70fab20e6ff787c76b833c55c2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Enrique=20Garc=C3=ADa=20Maci=C3=B1eiras?= Date: Mon, 27 Nov 2023 21:39:23 +0100 Subject: [PATCH] #384 Fix Codacy issues. Add license on files --- .../java/com/sngular/kloadgen/common/tools/ApiTool.java | 6 ++++++ .../keydeserialized/KeyDeserializedConfigElement.java | 6 ------ .../schemaregistry/SchemaRegistryConfigElementValue.java | 6 ++++++ .../java/com/sngular/kloadgen/extractor/ApiExtractor.java | 6 ++++++ .../com/sngular/kloadgen/extractor/SchemaExtractor.java | 6 ++++++ .../sngular/kloadgen/extractor/extractors/Extractor.java | 6 ++++++ .../kloadgen/extractor/extractors/ExtractorFactory.java | 6 ++++++ .../kloadgen/extractor/extractors/ExtractorRegistry.java | 6 ++++++ .../kloadgen/extractor/extractors/SchemaExtractorUtil.java | 6 ++++++ .../sngular/kloadgen/extractor/model/AsyncApiAbstract.java | 6 ++++++ .../com/sngular/kloadgen/extractor/model/AsyncApiFile.java | 6 ++++++ .../sngular/kloadgen/parsedschema/AbstractParsedSchema.java | 6 ++++++ .../com/sngular/kloadgen/parsedschema/AvroParsedSchema.java | 6 ++++++ .../com/sngular/kloadgen/parsedschema/JsonParsedSchema.java | 6 ++++++ .../sngular/kloadgen/parsedschema/ProtobufParsedSchema.java | 6 ++++++ .../kloadgen/property/editor/SerDesPackageValue.java | 6 ++++++ .../randomtool/generator/ProtoBufGeneratorTool.java | 6 ++++++ .../sngular/kloadgen/serializer/AvroSerializersUtil.java | 6 ++++++ .../com/sngular/kloadgen/serializer/ProtobufSerializer.java | 3 ++- src/main/java/com/sngular/kloadgen/util/ProtobufHelper.java | 6 ++++++ .../com/sngular/kloadgen/extractor/FakeParsedSchema.java | 6 ++++++ .../java/com/sngular/kloadgen/model/HeaderMappingTest.java | 6 ++++++ .../com/sngular/kloadgen/model/PropertyMappingTest.java | 6 ++++++ .../sngular/kloadgen/processor/JsonSchemaProcessorTest.java | 6 ++++++ .../kloadgen/processor/ProtobufSchemaProcessorTest.java | 6 ++++++ .../com/sngular/kloadgen/sampler/AsyncApiSamplerTest.java | 6 ++++++ .../sngular/kloadgen/serializer/SerializerTestFixture.java | 6 ++++++ 27 files changed, 152 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/sngular/kloadgen/common/tools/ApiTool.java b/src/main/java/com/sngular/kloadgen/common/tools/ApiTool.java index d5bee8f7..59484f3d 100644 --- a/src/main/java/com/sngular/kloadgen/common/tools/ApiTool.java +++ b/src/main/java/com/sngular/kloadgen/common/tools/ApiTool.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.common.tools; import java.util.ArrayList; diff --git a/src/main/java/com/sngular/kloadgen/config/keydeserialized/KeyDeserializedConfigElement.java b/src/main/java/com/sngular/kloadgen/config/keydeserialized/KeyDeserializedConfigElement.java index 1d868bac..0cdfe368 100644 --- a/src/main/java/com/sngular/kloadgen/config/keydeserialized/KeyDeserializedConfigElement.java +++ b/src/main/java/com/sngular/kloadgen/config/keydeserialized/KeyDeserializedConfigElement.java @@ -4,12 +4,6 @@ * * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -/* - * This Source Code Form is subject to the terms of the Mozilla Public - * * License, v. 2.0. If a copy of the MPL was not distributed with this - * * file, You can obtain one at https://mozilla.org/MPL/2.0/. - */ - package com.sngular.kloadgen.config.keydeserialized; import java.util.List; diff --git a/src/main/java/com/sngular/kloadgen/config/schemaregistry/SchemaRegistryConfigElementValue.java b/src/main/java/com/sngular/kloadgen/config/schemaregistry/SchemaRegistryConfigElementValue.java index 8aeae711..7ee3078c 100644 --- a/src/main/java/com/sngular/kloadgen/config/schemaregistry/SchemaRegistryConfigElementValue.java +++ b/src/main/java/com/sngular/kloadgen/config/schemaregistry/SchemaRegistryConfigElementValue.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.config.schemaregistry; public final class SchemaRegistryConfigElementValue { diff --git a/src/main/java/com/sngular/kloadgen/extractor/ApiExtractor.java b/src/main/java/com/sngular/kloadgen/extractor/ApiExtractor.java index a017d04f..d6eda7a7 100644 --- a/src/main/java/com/sngular/kloadgen/extractor/ApiExtractor.java +++ b/src/main/java/com/sngular/kloadgen/extractor/ApiExtractor.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.extractor; import java.io.File; diff --git a/src/main/java/com/sngular/kloadgen/extractor/SchemaExtractor.java b/src/main/java/com/sngular/kloadgen/extractor/SchemaExtractor.java index ac884640..c356bd24 100644 --- a/src/main/java/com/sngular/kloadgen/extractor/SchemaExtractor.java +++ b/src/main/java/com/sngular/kloadgen/extractor/SchemaExtractor.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.extractor; import java.io.IOException; diff --git a/src/main/java/com/sngular/kloadgen/extractor/extractors/Extractor.java b/src/main/java/com/sngular/kloadgen/extractor/extractors/Extractor.java index b67f7eaa..447e5161 100644 --- a/src/main/java/com/sngular/kloadgen/extractor/extractors/Extractor.java +++ b/src/main/java/com/sngular/kloadgen/extractor/extractors/Extractor.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.extractor.extractors; import java.util.List; diff --git a/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java b/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java index 4cb47419..892ecb77 100644 --- a/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java +++ b/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorFactory.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.extractor.extractors; import java.util.ArrayList; diff --git a/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorRegistry.java b/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorRegistry.java index 8aaf1fe2..1c61c373 100644 --- a/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorRegistry.java +++ b/src/main/java/com/sngular/kloadgen/extractor/extractors/ExtractorRegistry.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.extractor.extractors; import java.util.List; diff --git a/src/main/java/com/sngular/kloadgen/extractor/extractors/SchemaExtractorUtil.java b/src/main/java/com/sngular/kloadgen/extractor/extractors/SchemaExtractorUtil.java index 4b512103..821be7e6 100644 --- a/src/main/java/com/sngular/kloadgen/extractor/extractors/SchemaExtractorUtil.java +++ b/src/main/java/com/sngular/kloadgen/extractor/extractors/SchemaExtractorUtil.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.extractor.extractors; public final class SchemaExtractorUtil { diff --git a/src/main/java/com/sngular/kloadgen/extractor/model/AsyncApiAbstract.java b/src/main/java/com/sngular/kloadgen/extractor/model/AsyncApiAbstract.java index 30a4a9c8..c2b8c44e 100644 --- a/src/main/java/com/sngular/kloadgen/extractor/model/AsyncApiAbstract.java +++ b/src/main/java/com/sngular/kloadgen/extractor/model/AsyncApiAbstract.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.extractor.model; import java.util.Collections; diff --git a/src/main/java/com/sngular/kloadgen/extractor/model/AsyncApiFile.java b/src/main/java/com/sngular/kloadgen/extractor/model/AsyncApiFile.java index f28f70df..ea05aa49 100644 --- a/src/main/java/com/sngular/kloadgen/extractor/model/AsyncApiFile.java +++ b/src/main/java/com/sngular/kloadgen/extractor/model/AsyncApiFile.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.extractor.model; import java.util.List; diff --git a/src/main/java/com/sngular/kloadgen/parsedschema/AbstractParsedSchema.java b/src/main/java/com/sngular/kloadgen/parsedschema/AbstractParsedSchema.java index ee0d8d57..5df54d30 100644 --- a/src/main/java/com/sngular/kloadgen/parsedschema/AbstractParsedSchema.java +++ b/src/main/java/com/sngular/kloadgen/parsedschema/AbstractParsedSchema.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.parsedschema; import lombok.Getter; diff --git a/src/main/java/com/sngular/kloadgen/parsedschema/AvroParsedSchema.java b/src/main/java/com/sngular/kloadgen/parsedschema/AvroParsedSchema.java index 7641cd27..5d5a855b 100644 --- a/src/main/java/com/sngular/kloadgen/parsedschema/AvroParsedSchema.java +++ b/src/main/java/com/sngular/kloadgen/parsedschema/AvroParsedSchema.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.parsedschema; import org.apache.avro.Schema; diff --git a/src/main/java/com/sngular/kloadgen/parsedschema/JsonParsedSchema.java b/src/main/java/com/sngular/kloadgen/parsedschema/JsonParsedSchema.java index 1400a970..e5813c50 100644 --- a/src/main/java/com/sngular/kloadgen/parsedschema/JsonParsedSchema.java +++ b/src/main/java/com/sngular/kloadgen/parsedschema/JsonParsedSchema.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.parsedschema; public class JsonParsedSchema extends AbstractParsedSchema { diff --git a/src/main/java/com/sngular/kloadgen/parsedschema/ProtobufParsedSchema.java b/src/main/java/com/sngular/kloadgen/parsedschema/ProtobufParsedSchema.java index 94dc419c..bf2fc862 100644 --- a/src/main/java/com/sngular/kloadgen/parsedschema/ProtobufParsedSchema.java +++ b/src/main/java/com/sngular/kloadgen/parsedschema/ProtobufParsedSchema.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.parsedschema; import com.squareup.wire.schema.internal.parser.ProtoFileElement; diff --git a/src/main/java/com/sngular/kloadgen/property/editor/SerDesPackageValue.java b/src/main/java/com/sngular/kloadgen/property/editor/SerDesPackageValue.java index cf55f1c9..760ae41a 100644 --- a/src/main/java/com/sngular/kloadgen/property/editor/SerDesPackageValue.java +++ b/src/main/java/com/sngular/kloadgen/property/editor/SerDesPackageValue.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.property.editor; public class SerDesPackageValue { diff --git a/src/main/java/com/sngular/kloadgen/randomtool/generator/ProtoBufGeneratorTool.java b/src/main/java/com/sngular/kloadgen/randomtool/generator/ProtoBufGeneratorTool.java index f3fe5164..4def6ee0 100644 --- a/src/main/java/com/sngular/kloadgen/randomtool/generator/ProtoBufGeneratorTool.java +++ b/src/main/java/com/sngular/kloadgen/randomtool/generator/ProtoBufGeneratorTool.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.randomtool.generator; import java.util.ArrayList; diff --git a/src/main/java/com/sngular/kloadgen/serializer/AvroSerializersUtil.java b/src/main/java/com/sngular/kloadgen/serializer/AvroSerializersUtil.java index c6bb437a..3b9d5748 100644 --- a/src/main/java/com/sngular/kloadgen/serializer/AvroSerializersUtil.java +++ b/src/main/java/com/sngular/kloadgen/serializer/AvroSerializersUtil.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.serializer; import org.apache.avro.Conversions; diff --git a/src/main/java/com/sngular/kloadgen/serializer/ProtobufSerializer.java b/src/main/java/com/sngular/kloadgen/serializer/ProtobufSerializer.java index b62bf8cd..c50f0fe7 100644 --- a/src/main/java/com/sngular/kloadgen/serializer/ProtobufSerializer.java +++ b/src/main/java/com/sngular/kloadgen/serializer/ProtobufSerializer.java @@ -11,11 +11,12 @@ import java.nio.ByteBuffer; import java.util.Arrays; +import javax.xml.bind.DatatypeConverter; + import com.google.protobuf.Descriptors.Descriptor; import com.google.protobuf.DynamicMessage; import io.confluent.kafka.schemaregistry.protobuf.MessageIndexes; import io.confluent.kafka.schemaregistry.protobuf.ProtobufSchema; -import javax.xml.bind.DatatypeConverter; import lombok.extern.slf4j.Slf4j; import org.apache.kafka.common.errors.SerializationException; import org.apache.kafka.common.header.Headers; diff --git a/src/main/java/com/sngular/kloadgen/util/ProtobufHelper.java b/src/main/java/com/sngular/kloadgen/util/ProtobufHelper.java index 24e28715..e37dc563 100644 --- a/src/main/java/com/sngular/kloadgen/util/ProtobufHelper.java +++ b/src/main/java/com/sngular/kloadgen/util/ProtobufHelper.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.util; import java.util.Map; diff --git a/src/test/java/com/sngular/kloadgen/extractor/FakeParsedSchema.java b/src/test/java/com/sngular/kloadgen/extractor/FakeParsedSchema.java index cf6e874f..ff76c5a4 100644 --- a/src/test/java/com/sngular/kloadgen/extractor/FakeParsedSchema.java +++ b/src/test/java/com/sngular/kloadgen/extractor/FakeParsedSchema.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.extractor; import com.sngular.kloadgen.parsedschema.AbstractParsedSchema; diff --git a/src/test/java/com/sngular/kloadgen/model/HeaderMappingTest.java b/src/test/java/com/sngular/kloadgen/model/HeaderMappingTest.java index d9c0aab8..c6075c5e 100644 --- a/src/test/java/com/sngular/kloadgen/model/HeaderMappingTest.java +++ b/src/test/java/com/sngular/kloadgen/model/HeaderMappingTest.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.model; import org.assertj.core.api.Assertions; diff --git a/src/test/java/com/sngular/kloadgen/model/PropertyMappingTest.java b/src/test/java/com/sngular/kloadgen/model/PropertyMappingTest.java index 393f97f7..0288aca2 100644 --- a/src/test/java/com/sngular/kloadgen/model/PropertyMappingTest.java +++ b/src/test/java/com/sngular/kloadgen/model/PropertyMappingTest.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.model; import org.assertj.core.api.Assertions; diff --git a/src/test/java/com/sngular/kloadgen/processor/JsonSchemaProcessorTest.java b/src/test/java/com/sngular/kloadgen/processor/JsonSchemaProcessorTest.java index 710b0b51..dfdc6c76 100644 --- a/src/test/java/com/sngular/kloadgen/processor/JsonSchemaProcessorTest.java +++ b/src/test/java/com/sngular/kloadgen/processor/JsonSchemaProcessorTest.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.processor; import java.io.File; diff --git a/src/test/java/com/sngular/kloadgen/processor/ProtobufSchemaProcessorTest.java b/src/test/java/com/sngular/kloadgen/processor/ProtobufSchemaProcessorTest.java index fc834c54..912e8f56 100644 --- a/src/test/java/com/sngular/kloadgen/processor/ProtobufSchemaProcessorTest.java +++ b/src/test/java/com/sngular/kloadgen/processor/ProtobufSchemaProcessorTest.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.processor; import java.io.File; diff --git a/src/test/java/com/sngular/kloadgen/sampler/AsyncApiSamplerTest.java b/src/test/java/com/sngular/kloadgen/sampler/AsyncApiSamplerTest.java index 235f24dd..27b78bc3 100644 --- a/src/test/java/com/sngular/kloadgen/sampler/AsyncApiSamplerTest.java +++ b/src/test/java/com/sngular/kloadgen/sampler/AsyncApiSamplerTest.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.sampler; import java.io.File; diff --git a/src/test/java/com/sngular/kloadgen/serializer/SerializerTestFixture.java b/src/test/java/com/sngular/kloadgen/serializer/SerializerTestFixture.java index ae6827a7..12100776 100644 --- a/src/test/java/com/sngular/kloadgen/serializer/SerializerTestFixture.java +++ b/src/test/java/com/sngular/kloadgen/serializer/SerializerTestFixture.java @@ -1,3 +1,9 @@ +/* + * This Source Code Form is subject to the terms of the Mozilla Public + * * License, v. 2.0. If a copy of the MPL was not distributed with this + * * file, You can obtain one at https://mozilla.org/MPL/2.0/. + */ + package com.sngular.kloadgen.serializer; import java.io.File;