diff --git a/DataExtractionOSM/src/net/osmand/osm/util/MinskTransReader.java b/DataExtractionOSM/src/net/osmand/osm/util/MinskTransReader.java index 12691f09dd..72f87cc84e 100644 --- a/DataExtractionOSM/src/net/osmand/osm/util/MinskTransReader.java +++ b/DataExtractionOSM/src/net/osmand/osm/util/MinskTransReader.java @@ -126,7 +126,8 @@ public class MinskTransReader { Map correlated = new LinkedHashMap(); Map reverse = new LinkedHashMap(); List stopsToCheck = new ArrayList(stopsMap.values()); - for(int k =0; k closestObjects = busStops.getClosestObjects(r.latitude, r.longitude, 0, 1); // filter closest objects @@ -140,7 +141,8 @@ public class MinskTransReader { MapUtils.sortListOfEntities(closestObjects, r.latitude, r.longitude); int ind = 0; boolean ccorrelated = false; - while(ind < closestObjects.size() && !ccorrelated){ + int cOsize = closestObjects.size(); + while(ind < cOsize && !ccorrelated){ Node foundNode = closestObjects.get(ind); if(!reverse.containsKey(foundNode)){ // all is good no one registered to that stop @@ -279,7 +281,8 @@ public class MinskTransReader { list.add(0, end); list.add(start); } - for(int i=0; i