< prev index next >
src/java.desktop/share/classes/sun/java2d/marlin/FloatArrayCache.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2016, 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
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -125,22 +125,23 @@
if (toIndex != 0) {
Arrays.fill(array, fromIndex, toIndex, value);
}
if (doChecks) {
- check(array, 0, array.length, value);
+ check(array, fromIndex, toIndex, value);
}
}
static void check(final float[] array, final int fromIndex,
final int toIndex, final float value)
{
if (doChecks) {
// check zero on full array:
- for (int i = fromIndex; i < toIndex; i++) {
+ for (int i = 0; i < array.length; i++) {
if (array[i] != value) {
- logException("Invalid array value at " + i + "\n"
+ logException("Invalid value at: " + i + " = " + array[i]
+ + " from: " + fromIndex + " to: " + toIndex + "\n"
+ Arrays.toString(array), new Throwable());
// ensure array is correctly filled:
Arrays.fill(array, value);
< prev index next >