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 15:29:58 UTC
[commons-compress] branch master updated: 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
The following commit(s) were added to refs/heads/master by this push:
new 78601d5 Fix generics compiler warning.
78601d5 is described below
commit 78601d57462d13a1d23c5399bfa94b840d22afe9
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Wed Dec 1 10:29:34 2021 -0500
Fix generics compiler warning.
---
.../java/org/apache/commons/compress/harmony/unpack200/CpBands.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/apache/commons/compress/harmony/unpack200/CpBands.java b/src/main/java/org/apache/commons/compress/harmony/unpack200/CpBands.java
index dcee0f6..1fa98df 100644
--- a/src/main/java/org/apache/commons/compress/harmony/unpack200/CpBands.java
+++ b/src/main/java/org/apache/commons/compress/harmony/unpack200/CpBands.java
@@ -85,7 +85,7 @@ public class CpBands extends BandSet {
private Map mapClass;
private Map mapDescriptor;
- private Map mapUTF8;
+ private Map<String, Integer> mapUTF8;
// TODO: Not used
private Map mapSignature;
@@ -347,7 +347,7 @@ public class CpBands extends BandSet {
private void parseCpUtf8(final InputStream in) throws IOException, Pack200Exception {
final int cpUTF8Count = header.getCpUTF8Count();
cpUTF8 = new String[cpUTF8Count];
- mapUTF8 = new HashMap(cpUTF8Count + 1);
+ mapUTF8 = new HashMap<>(cpUTF8Count + 1);
cpUTF8[0] = ""; //$NON-NLS-1$
mapUTF8.put("", Integer.valueOf(0));
final int[] prefix = decodeBandInt("cpUTF8Prefix", in, Codec.DELTA5, cpUTF8Count - 2);
@@ -464,7 +464,7 @@ public class CpBands extends BandSet {
if (cputf8 == null) {
Integer index = null;
if (searchForIndex) {
- index = (Integer) mapUTF8.get(string);
+ index = mapUTF8.get(string);
}
if (index != null) {
return cpUTF8Value(index.intValue());