Implement adopting of route object

This commit is contained in:
Victor Shcherb 2017-08-31 00:03:47 +02:00
parent 19babbd730
commit 8725040fbe

View file

@ -230,11 +230,11 @@ public class BinaryMapRouteReaderAdapter {
if(decodingRules == null) { if(decodingRules == null) {
for(int i = 0; i < routeEncodingRules.size(); i++) { for(int i = 0; i < routeEncodingRules.size(); i++) {
RouteTypeRule rt = routeEncodingRules.get(i); RouteTypeRule rt = routeEncodingRules.get(i);
String ks = rt.getTag() +"#" + rt.getValue(); String ks = rt.getTag() +"#" + (rt.getValue() == null ? "" : rt.getValue());
decodingRules.put(ks, i); decodingRules.put(ks, i);
} }
} }
String k = tag +"#" +value; String k = tag +"#" + (value == null ? "" : value);
if(decodingRules.containsKey(k)) { if(decodingRules.containsKey(k)) {
return decodingRules.get(k).intValue(); return decodingRules.get(k).intValue();
} }