From 10186f4e179aefb613d3b6387c9635ebce6e1dd0 Mon Sep 17 00:00:00 2001 From: Xiaobing <61892277+klsince@users.noreply.github.com> Date: Tue, 18 Jun 2024 11:42:43 -0700 Subject: [PATCH] clean up jetbrain nullable annotation (#13427) --- .../tests/models/DummyTableUpsertMetadataManager.java | 6 +++--- .../inputformat/protobuf/ProtoBufCodeGenMessageDecoder.java | 2 +- .../protobuf/ProtoBufCodeGenMessageDecoderTest.java | 2 -- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/models/DummyTableUpsertMetadataManager.java b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/models/DummyTableUpsertMetadataManager.java index d17712c48798..a8c498cf260e 100644 --- a/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/models/DummyTableUpsertMetadataManager.java +++ b/pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/models/DummyTableUpsertMetadataManager.java @@ -23,6 +23,7 @@ import java.util.Collections; import java.util.Iterator; import java.util.Map; +import javax.annotation.Nullable; import org.apache.pinot.segment.local.data.manager.TableDataManager; import org.apache.pinot.segment.local.indexsegment.immutable.ImmutableSegmentImpl; import org.apache.pinot.segment.local.upsert.BasePartitionUpsertMetadataManager; @@ -92,9 +93,8 @@ protected long getNumPrimaryKeys() { @Override protected void doAddOrReplaceSegment(ImmutableSegmentImpl segment, ThreadSafeMutableRoaringBitmap validDocIds, - @org.jetbrains.annotations.Nullable ThreadSafeMutableRoaringBitmap queryableDocIds, - Iterator recordInfoIterator, @org.jetbrains.annotations.Nullable IndexSegment oldSegment, - @org.jetbrains.annotations.Nullable MutableRoaringBitmap validDocIdsForOldSegment) { + @Nullable ThreadSafeMutableRoaringBitmap queryableDocIds, Iterator recordInfoIterator, + @Nullable IndexSegment oldSegment, @Nullable MutableRoaringBitmap validDocIdsForOldSegment) { } @Override diff --git a/pinot-plugins/pinot-input-format/pinot-protobuf/src/main/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufCodeGenMessageDecoder.java b/pinot-plugins/pinot-input-format/pinot-protobuf/src/main/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufCodeGenMessageDecoder.java index 01f50c105bf3..7ebb10a3317c 100644 --- a/pinot-plugins/pinot-input-format/pinot-protobuf/src/main/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufCodeGenMessageDecoder.java +++ b/pinot-plugins/pinot-input-format/pinot-protobuf/src/main/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufCodeGenMessageDecoder.java @@ -29,11 +29,11 @@ import java.util.Arrays; import java.util.Map; import java.util.Set; +import javax.annotation.Nullable; import org.apache.pinot.plugin.inputformat.protobuf.codegen.MessageCodeGen; import org.apache.pinot.spi.data.readers.GenericRow; import org.apache.pinot.spi.stream.StreamMessageDecoder; import org.codehaus.janino.SimpleCompiler; -import org.jetbrains.annotations.Nullable; import org.slf4j.Logger; import org.slf4j.LoggerFactory; diff --git a/pinot-plugins/pinot-input-format/pinot-protobuf/src/test/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufCodeGenMessageDecoderTest.java b/pinot-plugins/pinot-input-format/pinot-protobuf/src/test/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufCodeGenMessageDecoderTest.java index 1fa4d656ac75..3f15ed42bbf3 100644 --- a/pinot-plugins/pinot-input-format/pinot-protobuf/src/test/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufCodeGenMessageDecoderTest.java +++ b/pinot-plugins/pinot-input-format/pinot-protobuf/src/test/java/org/apache/pinot/plugin/inputformat/protobuf/ProtoBufCodeGenMessageDecoderTest.java @@ -27,7 +27,6 @@ import java.util.Map; import java.util.Set; import org.apache.pinot.spi.data.readers.GenericRow; -import org.jetbrains.annotations.NotNull; import org.testng.Assert; import org.testng.annotations.DataProvider; import org.testng.annotations.Test; @@ -348,7 +347,6 @@ private static Set getAllSourceFieldsForComplexType() { NULLABLE_BOOL_FIELD, NULLABLE_BYTES_FIELD); } - @NotNull private ProtoBufCodeGenMessageDecoder setupDecoder(String name, String value, Set sourceFieldsForComplexType) throws Exception {