Skip to content

Commit

Permalink
Merge pull request #2381 from telefonicaid/task/set_geometry_null_val…
Browse files Browse the repository at this point in the history
…ue_when_invalid_format

Task/set geometry null value when invalid format
  • Loading branch information
fgalan authored Jun 10, 2024
2 parents 22c6c24 + 0e65f0a commit 5907e65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,10 @@ public void setObjectId(Integer objectId) throws ArcgisException {
public JsonObject toJson() {
JsonObject resultJSON = new JsonObject();

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

JsonObject attributes = new JsonObject();
for (Map.Entry<String, Object> attribute : this.attributes.entrySet()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ public class ArcgisAggregatorDomain {

LOGGER.debug("[ArcgisAggregatorDomain] - constructor init.");
try {
feature = Feature.createPointFeature(0, 0);
feature = new Feature();
} catch (Throwable e) {
LOGGER.error(
"ArcgisAggregatorDomain - Unexpected error " + e.getClass().getName() + " - " + e.getMessage());
Expand Down

0 comments on commit 5907e65

Please sign in to comment.