From cc34da75b5707d485f9909bcd6758e159e76f9b6 Mon Sep 17 00:00:00 2001 From: stefan-zobel Date: Tue, 9 Mar 2021 22:03:56 -0800 Subject: [PATCH] Java-API: byteCompressionType should be declared as primitive type byte (#7981) Summary: The variable `byteCompressionType` is only assigned values of primitive type and is never 'null', but it is declared with the boxed type 'Byte'. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7981 Reviewed By: ajkr Differential Revision: D26546600 Pulled By: jay-zhuang fbshipit-source-id: 07b579cdfcfc2262a448ca3626e216416fd05892 --- java/src/main/java/org/rocksdb/ColumnFamilyOptions.java | 2 +- java/src/main/java/org/rocksdb/Options.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/main/java/org/rocksdb/ColumnFamilyOptions.java b/java/src/main/java/org/rocksdb/ColumnFamilyOptions.java index 825c34973..72149bf26 100644 --- a/java/src/main/java/org/rocksdb/ColumnFamilyOptions.java +++ b/java/src/main/java/org/rocksdb/ColumnFamilyOptions.java @@ -339,7 +339,7 @@ public class ColumnFamilyOptions extends RocksObject final byte[] byteCompressionTypes = compressionPerLevel(nativeHandle_); final List compressionLevels = new ArrayList<>(); - for (final Byte byteCompressionType : byteCompressionTypes) { + for (final byte byteCompressionType : byteCompressionTypes) { compressionLevels.add(CompressionType.getCompressionType( byteCompressionType)); } diff --git a/java/src/main/java/org/rocksdb/Options.java b/java/src/main/java/org/rocksdb/Options.java index b695f233d..57f3aeffb 100644 --- a/java/src/main/java/org/rocksdb/Options.java +++ b/java/src/main/java/org/rocksdb/Options.java @@ -1408,7 +1408,7 @@ public class Options extends RocksObject final byte[] byteCompressionTypes = compressionPerLevel(nativeHandle_); final List compressionLevels = new ArrayList<>(); - for (final Byte byteCompressionType : byteCompressionTypes) { + for (final byte byteCompressionType : byteCompressionTypes) { compressionLevels.add(CompressionType.getCompressionType( byteCompressionType)); }