Spelling fix

This commit is contained in:
Jindra Petřík
2025-04-13 14:33:47 +02:00
parent c565ef2e98
commit 8a273e75d9
4 changed files with 15 additions and 15 deletions

View File

@@ -700,7 +700,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Converts to array.
*
* @param a the array into which the elements of this collection are to be
* @param value the array into which the elements of this collection are to be
* stored, if it is big enough; otherwise, a new array of the same runtime
* type is allocated for this purpose.
* @param <T> Type
@@ -708,19 +708,19 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
*/
@Override
@SuppressWarnings("unchecked")
public <T> T[] toArray(T[] a) {
if (a.length != size) {
a = (T[]) new AVM2InstructionItem[size];
public <T> T[] toArray(T[] value) {
if (value.length != size) {
value = (T[]) new AVM2InstructionItem[size];
}
AVM2InstructionItem item = firstItem;
if (item == null) {
return a;
return value;
}
int i = 0;
do {
a[i] = (T) item;
value[i] = (T) item;
item = item.next;
i++;
} while (item != firstItem);

View File

@@ -880,7 +880,7 @@ public class FastActionList implements Collection<ActionItem> {
/**
* Converts the list to an array.
*
* @param a the array into which the elements of this collection are to be
* @param value the array into which the elements of this collection are to be
* stored, if it is big enough; otherwise, a new array of the same runtime
* type is allocated for this purpose.
* @param <T> Type
@@ -888,19 +888,19 @@ public class FastActionList implements Collection<ActionItem> {
*/
@Override
@SuppressWarnings("unchecked")
public <T> T[] toArray(T[] a) {
if (a.length != size) {
a = (T[]) new ActionItem[size];
public <T> T[] toArray(T[] value) {
if (value.length != size) {
value = (T[]) new ActionItem[size];
}
ActionItem item = firstItem;
if (item == null) {
return a;
return value;
}
int i = 0;
do {
a[i] = (T) item;
value[i] = (T) item;
item = item.next;
i++;
} while (item != firstItem);