Fixes according to review

This commit is contained in:
PaulStets 2017-09-16 14:39:02 +03:00
parent 8f2ab2d077
commit 37b91eeadb

View file

@ -533,12 +533,12 @@ public class SearchPhrase {
}
public void sortFiles() {
if (indexes == null) {
if(indexes == null) {
indexes = new ArrayList<>(getOfflineIndexes());
}
Map<String, List<BinaryMapIndexReader>> diffsByRegion = getDiffsByRegion();
final LatLon ll = getLastTokenLocation();
if (ll != null) {
if(ll != null) {
Collections.sort(indexes, new Comparator<BinaryMapIndexReader>() {
Map<BinaryMapIndexReader, LatLon> locations = new HashMap<>();
@ -552,11 +552,11 @@ public class SearchPhrase {
}
private LatLon getLocation(BinaryMapIndexReader o1) {
if (locations.containsKey(o1)) {
if(locations.containsKey(o1)) {
return locations.get(o1);
}
LatLon rc1 = null;
if (o1.containsMapData()) {
if(o1.containsMapData()) {
rc1 = o1.getMapIndexes().get(0).getCenterLatLon();
} else {
rc1 = o1.getRegionCenter();