From ee5536183a9df90d1209d9effe5d2aa61d86abd3 Mon Sep 17 00:00:00 2001 From: Andrey Turbanov Date: Mon, 26 Jul 2021 16:31:13 +0000 Subject: [PATCH] 8265474: Dubious 'null' assignment in CompactByteArray.expand Reviewed-by: alanb, naoto --- .../share/classes/sun/text/CompactByteArray.java | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/java.base/share/classes/sun/text/CompactByteArray.java b/src/java.base/share/classes/sun/text/CompactByteArray.java index 81437b2c67a..d4dbb0e03f6 100644 --- a/src/java.base/share/classes/sun/text/CompactByteArray.java +++ b/src/java.base/share/classes/sun/text/CompactByteArray.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1996, 2020, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -129,7 +129,7 @@ public final class CompactByteArray implements Cloneable { { if (isCompact) expand(); - values[(int)index] = value; + values[index] = value; touchBlock(index >> BLOCKSHIFT, value); } @@ -326,17 +326,11 @@ public final class CompactByteArray implements Cloneable { for (i = 0; i < INDEXCOUNT; ++i) { indices[i] = (short)(i<