add an additional condition to handle null pointer exception
@@ -281,9 +281,11 @@ public class EditFeatureAttachmentsSample extends Application {
if (!edits.get(0).hasCompletedWithErrors()) {
displayMessage(null, "Edited feature successfully");
} else {
+ if (edits.get(0).getError() != null) {
throw edits.get(0).getError();
}
}
+ }
// update the displayed list of attachments
fetchAttachments(selected);
} catch (InterruptedException | ExecutionException e) {
