Skip to content
This repository was archived by the owner on Apr 16, 2022. It is now read-only.

Issue #780 Parsing JSON Central responses fails when unexpected fields arrive #781

Merged
merged 2 commits into from
Aug 20, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/org/opendatakit/briefcase/reused/http/CommonsHttp.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package org.opendatakit.briefcase.reused.http;

import static org.apache.http.client.config.CookieSpecs.STANDARD;
import static org.apache.http.client.config.CookieSpecs.IGNORE_COOKIES;
import static org.apache.http.client.config.RequestConfig.custom;
import static org.opendatakit.briefcase.reused.http.RequestMethod.POST;

Expand Down Expand Up @@ -71,7 +71,8 @@ private static HttpClientBuilder getBaseBuilder(int maxConnections) {
.setConnectionRequestTimeout(0)
.setSocketTimeout(0)
.setConnectTimeout(0)
.setCookieSpec(STANDARD).build());
.setCookieSpec(IGNORE_COOKIES)
.build());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,12 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Objects;

@JsonIgnoreProperties({"type"})
@JsonIgnoreProperties(ignoreUnknown = true)
public class CentralAttachment {
private final String name;
private final boolean exists;

@JsonCreator

public CentralAttachment(@JsonProperty("name") String name, @JsonProperty("exists") boolean exists) {
this.name = name;
this.exists = exists;
Expand Down