8300731: Avoid unnecessary array fill after creation in PaletteBuilder

Reviewed-by: prr, serb
This commit is contained in:
Andrey Turbanov 2023-01-21 19:25:18 +00:00
parent 67b1c890b3
commit cbfc069f6a

@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2023, 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
@ -212,9 +212,6 @@ public class PaletteBuilder {
protected void buildPalette() {
reduceList = new ColorNode[MAXLEVEL + 1];
for (int i = 0; i < reduceList.length; i++) {
reduceList[i] = null;
}
numNodes = 0;
maxNodes = 0;