You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by ru...@apache.org on 2022/03/30 21:09:31 UTC

[iceberg] branch master updated: Core:Removing an initialization that sets a variable to null (#4429)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5cc28ab  Core:Removing an initialization that sets a variable to null (#4429)
5cc28ab is described below

commit 5cc28abd0db0dd6ea1aa1a2e12810add829f977c
Author: felixYyu <fe...@live.cn>
AuthorDate: Thu Mar 31 05:09:15 2022 +0800

    Core:Removing an initialization that sets a variable to null (#4429)
---
 core/src/main/java/org/apache/iceberg/avro/Avro.java                | 2 +-
 core/src/main/java/org/apache/iceberg/avro/BuildAvroProjection.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/src/main/java/org/apache/iceberg/avro/Avro.java b/core/src/main/java/org/apache/iceberg/avro/Avro.java
index f2ae0e7..1aceb18 100644
--- a/core/src/main/java/org/apache/iceberg/avro/Avro.java
+++ b/core/src/main/java/org/apache/iceberg/avro/Avro.java
@@ -218,7 +218,7 @@ public class Avro {
       }
 
       private static CodecFactory toCodec(String codecAsString, String compressionLevel) {
-        CodecFactory codecFactory = null;
+        CodecFactory codecFactory;
         try {
           switch (Codec.valueOf(codecAsString.toUpperCase(Locale.ENGLISH))) {
             case UNCOMPRESSED:
diff --git a/core/src/main/java/org/apache/iceberg/avro/BuildAvroProjection.java b/core/src/main/java/org/apache/iceberg/avro/BuildAvroProjection.java
index 815e6bc..4ebb311 100644
--- a/core/src/main/java/org/apache/iceberg/avro/BuildAvroProjection.java
+++ b/core/src/main/java/org/apache/iceberg/avro/BuildAvroProjection.java
@@ -42,7 +42,7 @@ import org.apache.iceberg.types.Types;
  */
 class BuildAvroProjection extends AvroCustomOrderSchemaVisitor<Schema, Schema.Field> {
   private final Map<String, String> renames;
-  private Type current = null;
+  private Type current;
 
   BuildAvroProjection(org.apache.iceberg.Schema expectedSchema, Map<String, String> renames) {
     this.renames = renames;