Skip to content

Commit

Permalink
fix check geo null
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvaroVega committed Jun 10, 2024
1 parent 79a9e8a commit f1c18e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ public JsonObject toJson() {
JsonObject resultJSON = new JsonObject();

Geometry geo = this.getGeometry();
if (geo) {
if (geo != null) {
resultJSON.add(GEOMETRY_TAG, geo.toJSON());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,7 @@ protected void jsonElementToFeatureAttr(String attrName, String attrType, JsonEl

} else {
LOGGER.warn("Invalid geo:json type, only points allowed: " + location.toString());
feature.setGeometry(null);
}
} catch (Exception e) {
LOGGER.error("Invalid geo:json format, (sikipped): " + attrValue.toString() + " - Error: "
Expand Down

0 comments on commit f1c18e5

Please sign in to comment.