Skip to content

Commit

Permalink
Upgrade com.fasterxml.jackson to v2.13.2 (#1315)
Browse files Browse the repository at this point in the history
Fixes #1314

Signed-off-by: Bala.FA <[email protected]>
  • Loading branch information
balamurugana authored Mar 29, 2022
1 parent 7bbb802 commit 304b5b7
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 14 deletions.
9 changes: 6 additions & 3 deletions api/src/main/java/io/minio/S3Base.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Multimap;
Expand Down Expand Up @@ -1175,9 +1176,11 @@ protected static class NotificationResultRecords {
public NotificationResultRecords(Response response) {
this.response = response;
this.scanner = new Scanner(response.body().charStream()).useDelimiter("\n");
this.mapper = new ObjectMapper();
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
this.mapper =
JsonMapper.builder()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true)
.build();
}

/** returns closeable iterator of result of notification records. */
Expand Down
9 changes: 6 additions & 3 deletions api/src/main/java/io/minio/credentials/IamAwsProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import io.minio.messages.ResponseDate;
import java.io.IOException;
import java.net.InetAddress;
Expand Down Expand Up @@ -61,9 +62,11 @@ public IamAwsProvider(@Nullable String customEndpoint, @Nullable OkHttpClient cu
(customHttpClient != null)
? customHttpClient
: new OkHttpClient().newBuilder().protocols(Arrays.asList(Protocol.HTTP_1_1)).build();
this.mapper = new ObjectMapper();
this.mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
this.mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
this.mapper =
JsonMapper.builder()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true)
.build();
}

private void checkLoopbackHost(HttpUrl url) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.json.JsonMapper;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
Expand Down Expand Up @@ -47,9 +48,11 @@ public MinioClientConfigProvider(@Nullable String filename, @Nullable String ali

this.filename = filename;
this.alias = alias;
this.mapper = new ObjectMapper();
this.mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
this.mapper.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true);
this.mapper =
JsonMapper.builder()
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
.configure(MapperFeature.ACCEPT_CASE_INSENSITIVE_PROPERTIES, true)
.build();
}

/**
Expand Down
10 changes: 5 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ subprojects {
compile "com.carrotsearch.thirdparty:simple-xml-safe:2.7.1"
compile "com.google.guava:guava:30.1.1-jre"
compile "com.squareup.okhttp3:okhttp:4.8.1"
compile "com.fasterxml.jackson.core:jackson-annotations:2.11.2"
compile "com.fasterxml.jackson.core:jackson-core:2.11.2"
compile "com.fasterxml.jackson.core:jackson-databind:2.11.2"
compile "com.fasterxml.jackson.core:jackson-annotations:2.13.2"
compile "com.fasterxml.jackson.core:jackson-core:2.13.2"
compile "com.fasterxml.jackson.core:jackson-databind:2.13.2"
compile "org.bouncycastle:bcprov-jdk15on:1.69"
compile 'org.apache.commons:commons-compress:1.21'
compile "org.xerial.snappy:snappy-java:1.1.8.4"
Expand Down Expand Up @@ -140,7 +140,7 @@ project(':api') {

configurations.all {
resolutionStrategy {
force 'com.fasterxml.jackson.core:jackson-annotations:2.9.6'
force "com.fasterxml.jackson.core:jackson-annotations:2.13.2"
failOnVersionConflict()
}
}
Expand Down Expand Up @@ -254,7 +254,7 @@ project(':adminapi') {

configurations.all {
resolutionStrategy {
force 'com.fasterxml.jackson.core:jackson-annotations:2.9.6'
force "com.fasterxml.jackson.core:jackson-annotations:2.13.2"
failOnVersionConflict()
}
}
Expand Down

0 comments on commit 304b5b7

Please sign in to comment.