Replaces while iterators with foreach call
This commit is contained in:
@@ -135,9 +135,10 @@ public final class ItemList<StackType extends IAEStack> implements IItemList<Sta
|
||||
@Override
|
||||
synchronized public StackType getFirstItem()
|
||||
{
|
||||
Iterator<StackType> i = this.iterator();
|
||||
while (i.hasNext())
|
||||
return i.next();
|
||||
for (StackType stackType : this)
|
||||
{
|
||||
return stackType;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user