You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by ji...@apache.org on 2020/02/10 22:25:42 UTC

[druid] branch master updated: Codestyle - use java style array declaration (#9338)

This is an automated email from the ASF dual-hosted git repository.

jihoonson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 51d7864  Codestyle - use java style array declaration (#9338)
51d7864 is described below

commit 51d786493531bdb3240afb6367e8fe8001bfb9ec
Author: Suneet Saldanha <44...@users.noreply.github.com>
AuthorDate: Mon Feb 10 14:25:26 2020 -0800

    Codestyle - use java style array declaration (#9338)
    
    * Codestyle - use java style array declaration
    
    Replaced C-style array declarations with java style declarations and marked
    the intelliJ inspection as an error
    
    * cleanup test code
---
 .idea/inspectionProfiles/Druid.xml                   |  1 +
 .../druid/data/input/impl/RetryingInputStream.java   |  4 ++--
 .../org/apache/druid/java/util/common/FileUtils.java |  2 +-
 .../PrefetchableTextFilesFirehoseFactoryTest.java    |  2 +-
 .../input/impl/prefetch/RetryingInputStreamTest.java |  2 +-
 .../druid/java/util/common/CompressionUtilsTest.java |  4 ++--
 .../apache/druid/security/basic/BasicAuthUtils.java  |  2 +-
 .../aggregation/histogram/FixedBucketsHistogram.java |  4 ++--
 .../druid/indexing/common/task/HadoopIndexTask.java  |  2 +-
 .../druid/query/aggregation/VectorAggregator.java    |  2 +-
 .../druid/query/extraction/CascadeExtractionFn.java  |  2 +-
 .../druid/segment/data/TableLongEncodingReader.java  |  4 ++--
 .../apache/druid/segment/data/VSizeLongSerde.java    |  4 ++--
 .../druid/collections/bitmap/BitmapBenchmark.java    | 14 +++++++-------
 .../segment/data/CompressedFloatsSerdeTest.java      | 18 +++++++++---------
 .../data/CompressedLongsAutoEncodingSerdeTest.java   |  2 +-
 .../druid/segment/data/CompressedLongsSerdeTest.java | 20 ++++++++++----------
 .../segment/data/NumericNullColumnSelectorTest.java  |  4 ++--
 .../druid/segment/data/VSizeLongSerdeTest.java       | 14 +++++++-------
 19 files changed, 54 insertions(+), 53 deletions(-)

diff --git a/.idea/inspectionProfiles/Druid.xml b/.idea/inspectionProfiles/Druid.xml
index 0f3c9fa..67d3b74 100644
--- a/.idea/inspectionProfiles/Druid.xml
+++ b/.idea/inspectionProfiles/Druid.xml
@@ -13,6 +13,7 @@
     <inspection_tool class="ArraysAsListWithZeroOrOneArgument" enabled="true" level="ERROR" enabled_by_default="true" />
     <inspection_tool class="AssertWithSideEffects" enabled="true" level="ERROR" enabled_by_default="true" />
     <inspection_tool class="BoxingBoxedValue" enabled="true" level="ERROR" enabled_by_default="true" />
+    <inspection_tool class="CStyleArrayDeclaration" enabled="true" level="ERROR" enabled_by_default="true" />
     <inspection_tool class="CapturingCleaner" enabled="true" level="ERROR" enabled_by_default="true" />
     <inspection_tool class="CastConflictsWithInstanceof" enabled="true" level="ERROR" enabled_by_default="true" />
     <inspection_tool class="CastToIncompatibleInterface" enabled="true" level="ERROR" enabled_by_default="true" />
diff --git a/core/src/main/java/org/apache/druid/data/input/impl/RetryingInputStream.java b/core/src/main/java/org/apache/druid/data/input/impl/RetryingInputStream.java
index 8953281..13349e0 100644
--- a/core/src/main/java/org/apache/druid/data/input/impl/RetryingInputStream.java
+++ b/core/src/main/java/org/apache/druid/data/input/impl/RetryingInputStream.java
@@ -123,7 +123,7 @@ public class RetryingInputStream<T> extends InputStream
   }
 
   @Override
-  public int read(byte b[]) throws IOException
+  public int read(byte[] b) throws IOException
   {
     for (int nTry = 0; nTry < maxRetry; nTry++) {
       try {
@@ -137,7 +137,7 @@ public class RetryingInputStream<T> extends InputStream
   }
 
   @Override
-  public int read(byte b[], int off, int len) throws IOException
+  public int read(byte[] b, int off, int len) throws IOException
   {
     for (int nTry = 0; nTry < maxRetry; nTry++) {
       try {
diff --git a/core/src/main/java/org/apache/druid/java/util/common/FileUtils.java b/core/src/main/java/org/apache/druid/java/util/common/FileUtils.java
index 225b573..f84b011 100644
--- a/core/src/main/java/org/apache/druid/java/util/common/FileUtils.java
+++ b/core/src/main/java/org/apache/druid/java/util/common/FileUtils.java
@@ -255,7 +255,7 @@ public class FileUtils
       // Default implementation of this method in FilterOutputStream converts single write operation to
       // multiple write operations of 1 byte each, which is terribly inefficient.
       @Override
-      public void write(byte b[], int off, int len) throws IOException
+      public void write(byte[] b, int off, int len) throws IOException
       {
         out.write(b, off, len);
       }
diff --git a/core/src/test/java/org/apache/druid/data/input/impl/prefetch/PrefetchableTextFilesFirehoseFactoryTest.java b/core/src/test/java/org/apache/druid/data/input/impl/prefetch/PrefetchableTextFilesFirehoseFactoryTest.java
index d3a09a0..6394e48 100644
--- a/core/src/test/java/org/apache/druid/data/input/impl/prefetch/PrefetchableTextFilesFirehoseFactoryTest.java
+++ b/core/src/test/java/org/apache/druid/data/input/impl/prefetch/PrefetchableTextFilesFirehoseFactoryTest.java
@@ -627,7 +627,7 @@ public class PrefetchableTextFilesFirehoseFactoryTest
       }
 
       @Override
-      public int read(byte b[], int off, int len) throws IOException
+      public int read(byte[] b, int off, int len) throws IOException
       {
         if (readCount++ % NUM_READ_COUNTS_BEFORE_ERROR == 0) {
           if (numConnectionResets++ < maxConnectionResets) {
diff --git a/core/src/test/java/org/apache/druid/data/input/impl/prefetch/RetryingInputStreamTest.java b/core/src/test/java/org/apache/druid/data/input/impl/prefetch/RetryingInputStreamTest.java
index fb32132..51b5206 100644
--- a/core/src/test/java/org/apache/druid/data/input/impl/prefetch/RetryingInputStreamTest.java
+++ b/core/src/test/java/org/apache/druid/data/input/impl/prefetch/RetryingInputStreamTest.java
@@ -127,7 +127,7 @@ public class RetryingInputStreamTest
     }
 
     @Override
-    public int read(byte b[], int off, int len) throws IOException
+    public int read(byte[] b, int off, int len) throws IOException
     {
       if (throwError) {
         throwError = false;
diff --git a/core/src/test/java/org/apache/druid/java/util/common/CompressionUtilsTest.java b/core/src/test/java/org/apache/druid/java/util/common/CompressionUtilsTest.java
index 63fa47c..ebb7073 100644
--- a/core/src/test/java/org/apache/druid/java/util/common/CompressionUtilsTest.java
+++ b/core/src/test/java/org/apache/druid/java/util/common/CompressionUtilsTest.java
@@ -702,7 +702,7 @@ public class CompressionUtilsTest
     }
 
     @Override
-    public int read(byte b[]) throws IOException
+    public int read(byte[] b) throws IOException
     {
       final int len = Math.min(b.length, GZ_BYTES.length - pos.get() % GZ_BYTES.length);
       pos.addAndGet(len);
@@ -717,7 +717,7 @@ public class CompressionUtilsTest
     }
 
     @Override
-    public int read(byte b[], int off, int len) throws IOException
+    public int read(byte[] b, int off, int len) throws IOException
     {
       final int l = Math.min(len, GZ_BYTES.length - pos.get() % GZ_BYTES.length);
       pos.addAndGet(l);
diff --git a/extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/BasicAuthUtils.java b/extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/BasicAuthUtils.java
index 91926db..f346963 100644
--- a/extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/BasicAuthUtils.java
+++ b/extensions-core/druid-basic-security/src/main/java/org/apache/druid/security/basic/BasicAuthUtils.java
@@ -123,7 +123,7 @@ public class BasicAuthUtils
 
   public static byte[] generateSalt()
   {
-    byte salt[] = new byte[SALT_LENGTH];
+    byte[] salt = new byte[SALT_LENGTH];
     SECURE_RANDOM.nextBytes(salt);
     return salt;
   }
diff --git a/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java b/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java
index c623948..f408dbf 100644
--- a/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java
+++ b/extensions-core/histogram/src/main/java/org/apache/druid/query/aggregation/histogram/FixedBucketsHistogram.java
@@ -962,7 +962,7 @@ public class FixedBucketsHistogram
     double max = buf.getDouble();
     double min = buf.getDouble();
 
-    long histogram[] = new long[numBuckets];
+    long[] histogram = new long[numBuckets];
     buf.asLongBuffer().get(histogram);
     buf.position(buf.position() + Long.BYTES * histogram.length);
 
@@ -1004,7 +1004,7 @@ public class FixedBucketsHistogram
     double min = buf.getDouble();
 
     int nonEmptyBuckets = buf.getInt();
-    long histogram[] = new long[numBuckets];
+    long[] histogram = new long[numBuckets];
     for (int i = 0; i < nonEmptyBuckets; i++) {
       int bucket = buf.getInt();
       long bucketCount = buf.getLong();
diff --git a/indexing-service/src/main/java/org/apache/druid/indexing/common/task/HadoopIndexTask.java b/indexing-service/src/main/java/org/apache/druid/indexing/common/task/HadoopIndexTask.java
index 9d86ce8..21818ef 100644
--- a/indexing-service/src/main/java/org/apache/druid/indexing/common/task/HadoopIndexTask.java
+++ b/indexing-service/src/main/java/org/apache/druid/indexing/common/task/HadoopIndexTask.java
@@ -489,7 +489,7 @@ public class HadoopIndexTask extends HadoopTask implements ChatHandler
         Method innerProcessingRunTask = buildKillJobRunnerClass.getMethod("runTask", buildKillJobInput.getClass());
 
         Thread.currentThread().setContextClassLoader(loader);
-        final String killStatusString[] = (String[]) innerProcessingRunTask.invoke(
+        final String[] killStatusString = (String[]) innerProcessingRunTask.invoke(
             killMRJobInnerProcessingRunner,
             new Object[]{buildKillJobInput}
         );
diff --git a/processing/src/main/java/org/apache/druid/query/aggregation/VectorAggregator.java b/processing/src/main/java/org/apache/druid/query/aggregation/VectorAggregator.java
index 9da781d..8d0983e 100644
--- a/processing/src/main/java/org/apache/druid/query/aggregation/VectorAggregator.java
+++ b/processing/src/main/java/org/apache/druid/query/aggregation/VectorAggregator.java
@@ -64,7 +64,7 @@ public interface VectorAggregator
    *                       null, the aggregator will aggregate rows from 0 (inclusive) to numRows (exclusive).
    * @param positionOffset an offset to apply to each value from "positions"
    */
-  void aggregate(ByteBuffer buf, int numRows, int positions[], @Nullable int[] rows, int positionOffset);
+  void aggregate(ByteBuffer buf, int numRows, int[] positions, @Nullable int[] rows, int positionOffset);
 
   /**
    * Same as {@link BufferAggregator#get}.
diff --git a/processing/src/main/java/org/apache/druid/query/extraction/CascadeExtractionFn.java b/processing/src/main/java/org/apache/druid/query/extraction/CascadeExtractionFn.java
index 6564eac..e3c618f 100644
--- a/processing/src/main/java/org/apache/druid/query/extraction/CascadeExtractionFn.java
+++ b/processing/src/main/java/org/apache/druid/query/extraction/CascadeExtractionFn.java
@@ -30,7 +30,7 @@ import java.util.Arrays;
 
 public class CascadeExtractionFn implements ExtractionFn
 {
-  private final ExtractionFn extractionFns[];
+  private final ExtractionFn[] extractionFns;
   private final ChainedExtractionFn chainedExtractionFn;
   private final ChainedExtractionFn DEFAULT_CHAINED_EXTRACTION_FN = new ChainedExtractionFn(
       new ExtractionFn()
diff --git a/processing/src/main/java/org/apache/druid/segment/data/TableLongEncodingReader.java b/processing/src/main/java/org/apache/druid/segment/data/TableLongEncodingReader.java
index 738de6f..0a20e7b 100644
--- a/processing/src/main/java/org/apache/druid/segment/data/TableLongEncodingReader.java
+++ b/processing/src/main/java/org/apache/druid/segment/data/TableLongEncodingReader.java
@@ -25,7 +25,7 @@ import java.nio.ByteBuffer;
 
 public class TableLongEncodingReader implements CompressionFactory.LongEncodingReader
 {
-  private final long table[];
+  private final long[] table;
   private final int bitsPerValue;
   private final ByteBuffer buffer;
   private VSizeLongSerde.LongDeserializer deserializer;
@@ -51,7 +51,7 @@ public class TableLongEncodingReader implements CompressionFactory.LongEncodingR
     }
   }
 
-  private TableLongEncodingReader(ByteBuffer buffer, long table[], int bitsPerValue)
+  private TableLongEncodingReader(ByteBuffer buffer, long[] table, int bitsPerValue)
   {
     this.buffer = buffer;
     this.table = table;
diff --git a/processing/src/main/java/org/apache/druid/segment/data/VSizeLongSerde.java b/processing/src/main/java/org/apache/druid/segment/data/VSizeLongSerde.java
index 6741be5..c0c3c08 100644
--- a/processing/src/main/java/org/apache/druid/segment/data/VSizeLongSerde.java
+++ b/processing/src/main/java/org/apache/druid/segment/data/VSizeLongSerde.java
@@ -37,8 +37,8 @@ import java.nio.ByteOrder;
 public class VSizeLongSerde
 {
 
-  public static final int SUPPORTED_SIZES[] = {1, 2, 4, 8, 12, 16, 20, 24, 32, 40, 48, 56, 64};
-  public static final byte EMPTY[] = {0, 0, 0, 0};
+  public static final int[] SUPPORTED_SIZES = {1, 2, 4, 8, 12, 16, 20, 24, 32, 40, 48, 56, 64};
+  public static final byte[] EMPTY = {0, 0, 0, 0};
 
   public static int getBitsForMax(long value)
   {
diff --git a/processing/src/test/java/org/apache/druid/collections/bitmap/BitmapBenchmark.java b/processing/src/test/java/org/apache/druid/collections/bitmap/BitmapBenchmark.java
index a0689b8..f1fe760 100644
--- a/processing/src/test/java/org/apache/druid/collections/bitmap/BitmapBenchmark.java
+++ b/processing/src/test/java/org/apache/druid/collections/bitmap/BitmapBenchmark.java
@@ -48,13 +48,13 @@ public class BitmapBenchmark
 {
   public static final int LENGTH = 500_000;
   public static final int SIZE = 10_000;
-  static final ImmutableConciseSet CONCISE[] = new ImmutableConciseSet[SIZE];
-  static final ImmutableConciseSet OFF_HEAP_CONCISE[] = new ImmutableConciseSet[SIZE];
-  static final ImmutableRoaringBitmap ROARING[] = new ImmutableRoaringBitmap[SIZE];
-  static final ImmutableRoaringBitmap IMMUTABLE_ROARING[] = new ImmutableRoaringBitmap[SIZE];
-  static final ImmutableRoaringBitmap OFF_HEAP_ROARING[] = new ImmutableRoaringBitmap[SIZE];
-  static final ImmutableBitmap GENERIC_CONCISE[] = new ImmutableBitmap[SIZE];
-  static final ImmutableBitmap GENERIC_ROARING[] = new ImmutableBitmap[SIZE];
+  static final ImmutableConciseSet[] CONCISE = new ImmutableConciseSet[SIZE];
+  static final ImmutableConciseSet[] OFF_HEAP_CONCISE = new ImmutableConciseSet[SIZE];
+  static final ImmutableRoaringBitmap[] ROARING = new ImmutableRoaringBitmap[SIZE];
+  static final ImmutableRoaringBitmap[] IMMUTABLE_ROARING = new ImmutableRoaringBitmap[SIZE];
+  static final ImmutableRoaringBitmap[] OFF_HEAP_ROARING = new ImmutableRoaringBitmap[SIZE];
+  static final ImmutableBitmap[] GENERIC_CONCISE = new ImmutableBitmap[SIZE];
+  static final ImmutableBitmap[] GENERIC_ROARING = new ImmutableBitmap[SIZE];
   static final ConciseBitmapFactory CONCISE_FACTORY = new ConciseBitmapFactory();
   static final RoaringBitmapFactory ROARING_FACTORY = new RoaringBitmapFactory();
   static Random rand = new Random(0);
diff --git a/processing/src/test/java/org/apache/druid/segment/data/CompressedFloatsSerdeTest.java b/processing/src/test/java/org/apache/druid/segment/data/CompressedFloatsSerdeTest.java
index 72e3cf5..4b78b52 100644
--- a/processing/src/test/java/org/apache/druid/segment/data/CompressedFloatsSerdeTest.java
+++ b/processing/src/test/java/org/apache/druid/segment/data/CompressedFloatsSerdeTest.java
@@ -61,14 +61,14 @@ public class CompressedFloatsSerdeTest
   protected final CompressionStrategy compressionStrategy;
   protected final ByteOrder order;
 
-  private final float values0[] = {};
-  private final float values1[] = {0f, 1f, 1f, 0f, 1f, 1f, 1f, 1f, 0f, 0f, 1f, 1f};
-  private final float values2[] = {13.2f, 6.1f, 0.001f, 123f, 12572f, 123.1f, 784.4f, 6892.8634f, 8.341111f};
-  private final float values3[] = {0.001f, 0.001f, 0.001f, 0.001f, 0.001f, 100f, 100f, 100f, 100f, 100f};
-  private final float values4[] = {0f, 0f, 0f, 0f, 0.01f, 0f, 0f, 0f, 21.22f, 0f, 0f, 0f, 0f, 0f, 0f};
-  private final float values5[] = {123.16f, 1.12f, 62.00f, 462.12f, 517.71f, 56.54f, 971.32f, 824.22f, 472.12f, 625.26f};
-  private final float values6[] = {1000000f, 1000001f, 1000002f, 1000003f, 1000004f, 1000005f, 1000006f, 1000007f, 1000008f};
-  private final float values7[] = {
+  private final float[] values0 = {};
+  private final float[] values1 = {0f, 1f, 1f, 0f, 1f, 1f, 1f, 1f, 0f, 0f, 1f, 1f};
+  private final float[] values2 = {13.2f, 6.1f, 0.001f, 123f, 12572f, 123.1f, 784.4f, 6892.8634f, 8.341111f};
+  private final float[] values3 = {0.001f, 0.001f, 0.001f, 0.001f, 0.001f, 100f, 100f, 100f, 100f, 100f};
+  private final float[] values4 = {0f, 0f, 0f, 0f, 0.01f, 0f, 0f, 0f, 21.22f, 0f, 0f, 0f, 0f, 0f, 0f};
+  private final float[] values5 = {123.16f, 1.12f, 62.00f, 462.12f, 517.71f, 56.54f, 971.32f, 824.22f, 472.12f, 625.26f};
+  private final float[] values6 = {1000000f, 1000001f, 1000002f, 1000003f, 1000004f, 1000005f, 1000006f, 1000007f, 1000008f};
+  private final float[] values7 = {
       Float.POSITIVE_INFINITY, Float.NEGATIVE_INFINITY, 12378.5734f, -12718243.7496f, -93653653.1f, 12743153.385534f,
       21431.414538f, 65487435436632.123f, -43734526234564.65f
   };
@@ -98,7 +98,7 @@ public class CompressedFloatsSerdeTest
   @Test
   public void testChunkSerde() throws Exception
   {
-    float chunk[] = new float[10000];
+    float[] chunk = new float[10000];
     for (int i = 0; i < 10000; i++) {
       chunk[i] = i;
     }
diff --git a/processing/src/test/java/org/apache/druid/segment/data/CompressedLongsAutoEncodingSerdeTest.java b/processing/src/test/java/org/apache/druid/segment/data/CompressedLongsAutoEncodingSerdeTest.java
index 07a24c3..ca6dd69 100644
--- a/processing/src/test/java/org/apache/druid/segment/data/CompressedLongsAutoEncodingSerdeTest.java
+++ b/processing/src/test/java/org/apache/druid/segment/data/CompressedLongsAutoEncodingSerdeTest.java
@@ -78,7 +78,7 @@ public class CompressedLongsAutoEncodingSerdeTest
     double numValuesPerByte = 8.0 / (double) numBits;
 
     int numRows = (int) (blockSize * numValuesPerByte) * 2 + ThreadLocalRandom.current().nextInt(1, 101);
-    long chunk[] = new long[numRows];
+    long[] chunk = new long[numRows];
     for (int i = 0; i < numRows; i++) {
       chunk[i] = ThreadLocalRandom.current().nextLong(bound);
     }
diff --git a/processing/src/test/java/org/apache/druid/segment/data/CompressedLongsSerdeTest.java b/processing/src/test/java/org/apache/druid/segment/data/CompressedLongsSerdeTest.java
index 1480db6..0fde252 100644
--- a/processing/src/test/java/org/apache/druid/segment/data/CompressedLongsSerdeTest.java
+++ b/processing/src/test/java/org/apache/druid/segment/data/CompressedLongsSerdeTest.java
@@ -62,18 +62,18 @@ public class CompressedLongsSerdeTest
   protected final CompressionStrategy compressionStrategy;
   protected final ByteOrder order;
 
-  private final long values0[] = {};
-  private final long values1[] = {0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1};
-  private final long values2[] = {12, 5, 2, 9, 3, 2, 5, 1, 0, 6, 13, 10, 15};
-  private final long values3[] = {1, 1, 1, 1, 1, 11, 11, 11, 11};
-  private final long values4[] = {200, 200, 200, 401, 200, 301, 200, 200, 200, 404, 200, 200, 200, 200};
-  private final long values5[] = {123, 632, 12, 39, 536, 0, 1023, 52, 777, 526, 214, 562, 823, 346};
-  private final long values6[] = {1000000, 1000001, 1000002, 1000003, 1000004, 1000005, 1000006, 1000007, 1000008};
-  private final long values7[] = {
+  private final long[] values0 = {};
+  private final long[] values1 = {0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1};
+  private final long[] values2 = {12, 5, 2, 9, 3, 2, 5, 1, 0, 6, 13, 10, 15};
+  private final long[] values3 = {1, 1, 1, 1, 1, 11, 11, 11, 11};
+  private final long[] values4 = {200, 200, 200, 401, 200, 301, 200, 200, 200, 404, 200, 200, 200, 200};
+  private final long[] values5 = {123, 632, 12, 39, 536, 0, 1023, 52, 777, 526, 214, 562, 823, 346};
+  private final long[] values6 = {1000000, 1000001, 1000002, 1000003, 1000004, 1000005, 1000006, 1000007, 1000008};
+  private final long[] values7 = {
       Long.MAX_VALUE, Long.MIN_VALUE, 12378, -12718243, -1236213, 12743153, 21364375452L,
       65487435436632L, -43734526234564L
   };
-  private final long values8[] = {Long.MAX_VALUE, 0, 321, 15248425, 13523212136L, 63822, 3426, 96};
+  private final long[] values8 = {Long.MAX_VALUE, 0, 321, 15248425, 13523212136L, 63822, 3426, 96};
 
   // built test value with enough unique values to not use table encoding for auto strategy
   private static long[] addUniques(long[] val)
@@ -114,7 +114,7 @@ public class CompressedLongsSerdeTest
   @Test
   public void testChunkSerde() throws Exception
   {
-    long chunk[] = new long[10000];
+    long[] chunk = new long[10000];
     for (int i = 0; i < 10000; i++) {
       chunk[i] = i;
     }
diff --git a/processing/src/test/java/org/apache/druid/segment/data/NumericNullColumnSelectorTest.java b/processing/src/test/java/org/apache/druid/segment/data/NumericNullColumnSelectorTest.java
index 0966b05..add494b 100644
--- a/processing/src/test/java/org/apache/druid/segment/data/NumericNullColumnSelectorTest.java
+++ b/processing/src/test/java/org/apache/druid/segment/data/NumericNullColumnSelectorTest.java
@@ -194,7 +194,7 @@ public class NumericNullColumnSelectorTest
   )
   {
     boolean encounteredNull = false;
-    boolean nullVector[];
+    boolean[] nullVector;
 
     // read it all, advancing offset
     while (!readAllVectors.isDone()) {
@@ -228,7 +228,7 @@ public class NumericNullColumnSelectorTest
   )
   {
     boolean encounteredNull = false;
-    boolean nullVector[];
+    boolean[] nullVector;
 
     // test overlapping reads (should reset iterator anyway)
     readAllVectors.mangleOffset(0);
diff --git a/processing/src/test/java/org/apache/druid/segment/data/VSizeLongSerdeTest.java b/processing/src/test/java/org/apache/druid/segment/data/VSizeLongSerdeTest.java
index 569172d..879077f 100644
--- a/processing/src/test/java/org/apache/druid/segment/data/VSizeLongSerdeTest.java
+++ b/processing/src/test/java/org/apache/druid/segment/data/VSizeLongSerdeTest.java
@@ -33,13 +33,13 @@ public class VSizeLongSerdeTest
   private ByteBuffer buffer;
   private ByteArrayOutputStream outStream;
   private ByteBuffer outBuffer;
-  private long values0[] = {0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1};
-  private long values1[] = {0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1};
-  private long values2[] = {12, 5, 2, 9, 3, 2, 5, 1, 0, 6, 13, 10, 15};
-  private long values3[] = {1, 1, 1, 1, 1, 11, 11, 11, 11};
-  private long values4[] = {200, 200, 200, 401, 200, 301, 200, 200, 200, 404, 200, 200, 200, 200};
-  private long values5[] = {123, 632, 12, 39, 536, 0, 1023, 52, 777, 526, 214, 562, 823, 346};
-  private long values6[] = {1000000, 1000001, 1000002, 1000003, 1000004, 1000005, 1000006, 1000007, 1000008};
+  private final long[] values0 = {0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1};
+  private final long[] values1 = {0, 1, 1, 0, 1, 1, 1, 1, 0, 0, 1, 1};
+  private final long[] values2 = {12, 5, 2, 9, 3, 2, 5, 1, 0, 6, 13, 10, 15};
+  private final long[] values3 = {1, 1, 1, 1, 1, 11, 11, 11, 11};
+  private final long[] values4 = {200, 200, 200, 401, 200, 301, 200, 200, 200, 404, 200, 200, 200, 200};
+  private final long[] values5 = {123, 632, 12, 39, 536, 0, 1023, 52, 777, 526, 214, 562, 823, 346};
+  private final long[] values6 = {1000000, 1000001, 1000002, 1000003, 1000004, 1000005, 1000006, 1000007, 1000008};
 
   @Before
   public void setUp()


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org