mirror of
https://github.com/ProjectSWGCore/Holocore.git
synced 2026-10-05 20:13:20 -04:00
getDestinationPoint() in TravelService now uses for-each instead of an Iterator-based while-loop
This commit is contained in:
@@ -487,11 +487,8 @@ public final class TravelService extends Service {
|
||||
|
||||
private TravelPoint getDestinationPoint(Terrain terrain, String pointName) {
|
||||
TravelPoint currentResult = null;
|
||||
Iterator<TravelPoint> pointIterator = pointsOnPlanet.get(terrain).iterator();
|
||||
|
||||
while(pointIterator.hasNext()) {
|
||||
TravelPoint candidate = pointIterator.next();
|
||||
|
||||
for(TravelPoint candidate : pointsOnPlanet.get(terrain)) {
|
||||
if(candidate.getName().equals(pointName)) {
|
||||
currentResult = candidate;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user