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
This commit is contained in:
stefan-zobel 2021-03-09 22:03:56 -08:00 committed by Facebook GitHub Bot
parent 6fad38ebe8
commit cc34da75b5
2 changed files with 2 additions and 2 deletions

View File

@ -339,7 +339,7 @@ public class ColumnFamilyOptions extends RocksObject
final byte[] byteCompressionTypes =
compressionPerLevel(nativeHandle_);
final List<CompressionType> compressionLevels = new ArrayList<>();
for (final Byte byteCompressionType : byteCompressionTypes) {
for (final byte byteCompressionType : byteCompressionTypes) {
compressionLevels.add(CompressionType.getCompressionType(
byteCompressionType));
}

View File

@ -1408,7 +1408,7 @@ public class Options extends RocksObject
final byte[] byteCompressionTypes =
compressionPerLevel(nativeHandle_);
final List<CompressionType> compressionLevels = new ArrayList<>();
for (final Byte byteCompressionType : byteCompressionTypes) {
for (final byte byteCompressionType : byteCompressionTypes) {
compressionLevels.add(CompressionType.getCompressionType(
byteCompressionType));
}