Use Java style array decelerations (#362)

This commit is contained in:
Arturo Bernal 2022-11-26 21:32:07 +01:00 committed by GitHub
parent 81a498b116
commit 954d222aa6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 5 deletions

View File

@ -63,7 +63,7 @@ public class ObjectArrayIterator<E> implements ResettableIterator<E> {
* @throws NullPointerException if {@code array} is {@code null}
* @throws IndexOutOfBoundsException if the start index is out of bounds
*/
public ObjectArrayIterator(final E array[], final int start) {
public ObjectArrayIterator(final E[] array, final int start) {
this(array, start, array.length);
}
@ -78,7 +78,7 @@ public class ObjectArrayIterator<E> implements ResettableIterator<E> {
* @throws IllegalArgumentException if end index is before the start
* @throws NullPointerException if {@code array} is {@code null}
*/
public ObjectArrayIterator(final E array[], final int start, final int end) {
public ObjectArrayIterator(final E[] array, final int start, final int end) {
if (start < 0) {
throw new ArrayIndexOutOfBoundsException("Start index must not be less than zero");
}

View File

@ -621,8 +621,8 @@ public class AbstractHashedMap<K, V> extends AbstractMap<K, V> implements Iterab
threshold = calculateThreshold(newCapacity, loadFactor);
data = new HashEntry[newCapacity];
} else {
final HashEntry<K, V> oldEntries[] = data;
final HashEntry<K, V> newEntries[] = new HashEntry[newCapacity];
final HashEntry<K, V>[] oldEntries = data;
final HashEntry<K, V>[] newEntries = new HashEntry[newCapacity];
modCount++;
for (int i = oldCapacity - 1; i >= 0; i--) {

View File

@ -262,7 +262,7 @@ public class ListOrderedSet<E>
}
@Override
public <T> T[] toArray(final T a[]) {
public <T> T[] toArray(final T[] a) {
return setOrder.toArray(a);
}