--- old/src/java.desktop/share/classes/sun/java2d/marlin/DoubleArrayCache.java 2018-02-15 13:11:12.696385696 +0100 +++ new/src/java.desktop/share/classes/sun/java2d/marlin/DoubleArrayCache.java 2018-02-15 13:11:12.540381423 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2018, 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 @@ -99,7 +99,7 @@ Reference(final DoubleArrayCache cache, final int initialSize) { this.cache = cache; this.clean = cache.clean; - this.initial = createArray(initialSize, clean); + this.initial = createArray(initialSize); if (DO_STATS) { cache.stats.totalInitial += initialSize; } @@ -116,7 +116,7 @@ logInfo(getLogPrefix(clean) + "DoubleArrayCache: " + "getArray[oversize]: length=\t" + length); } - return createArray(length, clean); + return createArray(length); } double[] widenArray(final double[] array, final int usedSize, @@ -202,7 +202,7 @@ if (DO_STATS) { stats.createOp++; } - return createArray(arraySize, clean); + return createArray(arraySize); } void putArray(final double[] array) @@ -229,12 +229,8 @@ } } - static double[] createArray(final int length, final boolean clean) { - if (clean) { - return new double[length]; - } - // use JDK9 Unsafe.allocateUninitializedArray(class, length): - return (double[]) OffHeapArray.UNSAFE.allocateUninitializedArray(double.class, length); + static double[] createArray(final int length) { + return new double[length]; } static void fill(final double[] array, final int fromIndex,