Java5 cleanup

- Replace for loops with foreach
- Remove unnecessary boxing
This commit is contained in:
Tom Elfring committed 2017-08-05 14:06:36 +02:00
1 parent 6721909e84
commit 3db03edbc9
6 files changed
+50 -41

No files matched your search

@@ -95,12 +95,10 @@ public final class PipeUtils
List<IFluidHandler> availableAcceptors = new ArrayList<IFluidHandler>();
IFluidHandler[] possibleAcceptors = getConnectedAcceptors(from);
for(int i = 0; i < possibleAcceptors.length; i++)
for (IFluidHandler handler : possibleAcceptors)
{
IFluidHandler handler = possibleAcceptors[i];
if(handler != null && canFill(handler, stack))
if (handler != null && canFill(handler, stack))
{
availableAcceptors.add(handler);
}
@@ -168,4 +166,4 @@ public final class PipeUtils
return false;
}
}
}