You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2021/12/01 14:47:00 UTC

[commons-compress] 01/02: Fix generics compiler warning.

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

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git

commit 83ebfde7c3ce369784e8e56578ab2391def97489
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Dec 1 09:44:25 2021 -0500

    Fix generics compiler warning.
---
 .../java/org/apache/commons/compress/harmony/pack200/BHSDCodec.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/compress/harmony/pack200/BHSDCodec.java b/src/main/java/org/apache/commons/compress/harmony/pack200/BHSDCodec.java
index 39cac37..8bd7020 100644
--- a/src/main/java/org/apache/commons/compress/harmony/pack200/BHSDCodec.java
+++ b/src/main/java/org/apache/commons/compress/harmony/pack200/BHSDCodec.java
@@ -318,7 +318,7 @@ public final class BHSDCodec extends Codec {
             throw new Pack200Exception("unable to encode");
         }
 
-        final List byteList = new ArrayList();
+        final List<Byte> byteList = new ArrayList<>();
         for (int n = 0; n < b; n++) {
             long byteN;
             if (z < l) {
@@ -338,7 +338,7 @@ public final class BHSDCodec extends Codec {
         }
         final byte[] bytes = new byte[byteList.size()];
         for (int i = 0; i < bytes.length; i++) {
-            bytes[i] = ((Byte) byteList.get(i)).byteValue();
+            bytes[i] = byteList.get(i).byteValue();
         }
         return bytes;
     }