Fix nullpointer exception
This commit is contained in:
parent
bb4864eefe
commit
46bca3b1bb
3 changed files with 6 additions and 1 deletions
|
@ -47,7 +47,7 @@ public class Amenity extends MapObject {
|
||||||
this.site = entity.getTag(OSMTagKey.CONTACT_WEBSITE);
|
this.site = entity.getTag(OSMTagKey.CONTACT_WEBSITE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.site.indexOf("://") == -1){
|
if (this.site != null && !this.site.startsWith("http://")){
|
||||||
this.site = "http://"+this.site;
|
this.site = "http://"+this.site;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,6 +106,10 @@ public class OpeningHoursParser {
|
||||||
public String toString(){
|
public String toString(){
|
||||||
StringBuilder s = new StringBuilder();
|
StringBuilder s = new StringBuilder();
|
||||||
|
|
||||||
|
if (rules.isEmpty()) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
|
||||||
for (OpeningHoursRule r : rules) {
|
for (OpeningHoursRule r : rules) {
|
||||||
s.append(r.toString()).append("; ");
|
s.append(r.toString()).append("; ");
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,6 +100,7 @@ public class EditingPOIActivity implements DialogProvider {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showPOIDialog(int dialogID, Node n, AmenityType type, String subType) {
|
private void showPOIDialog(int dialogID, Node n, AmenityType type, String subType) {
|
||||||
|
System.out.println("showing dialog: "+n.toString());
|
||||||
Amenity a = new Amenity(n, type, subType);
|
Amenity a = new Amenity(n, type, subType);
|
||||||
dialogBundle.putSerializable(KEY_AMENITY, a);
|
dialogBundle.putSerializable(KEY_AMENITY, a);
|
||||||
dialogBundle.putSerializable(KEY_AMENITY_NODE, n);
|
dialogBundle.putSerializable(KEY_AMENITY_NODE, n);
|
||||||
|
|
Loading…
Reference in a new issue