Skip to content

Commit 0bb59ca

Browse files
authored
Merge pull request #58 from embulk/jackson-2.15.3
Bump the depended Jackson version to 2.15.3
2 parents 4da6770 + 697fe59 commit 0bb59ca

File tree

6 files changed

+49
-13
lines changed

6 files changed

+49
-13
lines changed

.github/workflows/check.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
jacksonVersion: [ "2.6.7.5", "2.7.9", "2.8.11", "2.9.10", "2.10.5", "2.11.4", "2.12.7", "2.13.5", "2.14.3", "2.15.2" ]
12+
jacksonVersion: [ "2.15.3" ]
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
- name: Set up OpenJDK 8
1616
uses: actions/setup-java@v3
1717
with:

.github/workflows/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
hash-master: ${{ steps.hash-master.outputs.hash-master }}
1111
hash-main: ${{ steps.hash-main.outputs.hash-main }}
1212
steps:
13-
- uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
1414
with:
1515
fetch-depth: 0
1616
- id: hash-master
@@ -30,7 +30,7 @@ jobs:
3030
if: needs.diff.outputs.hash-master != needs.diff.outputs.hash-main
3131
runs-on: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@v3
33+
- uses: actions/checkout@v4
3434
with:
3535
fetch-depth: 0
3636
- name: Checkout master

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
fail-fast: true
1313
steps:
14-
- uses: actions/checkout@v3
14+
- uses: actions/checkout@v4
1515
- name: Set up OpenJDK 8
1616
uses: actions/setup-java@v3
1717
with:

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ plugins {
88

99
ext {
1010
if (!project.hasProperty("jacksonVersionForJacksonTest")) {
11-
jacksonVersionForJacksonTest = "2.6.7.5"
11+
jacksonVersionForJacksonTest = "2.15.3"
1212
}
1313
}
1414

@@ -62,7 +62,7 @@ dependencies {
6262

6363
// Dependencies should be "api" so that their scope would be "compile" in "pom.xml".
6464
api "javax.validation:validation-api:1.1.0.Final"
65-
api platform("com.fasterxml.jackson:jackson-bom:2.6.7.5")
65+
api platform("com.fasterxml.jackson:jackson-bom:2.15.3")
6666
api "com.fasterxml.jackson.core:jackson-annotations"
6767
api "com.fasterxml.jackson.core:jackson-core"
6868
api "com.fasterxml.jackson.core:jackson-databind"
@@ -186,7 +186,7 @@ publishing {
186186
developers {
187187
developer {
188188
name = "Dai MIKURUBE"
189-
email = "dmikurube@treasure-data.com"
189+
email = "dmikurube@acm.org"
190190
}
191191
}
192192

gradle.lockfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# This is a Gradle generated file for dependency locking.
22
# Manual edits can break the build and are not advised.
33
# This file is expected to be part of source control.
4-
com.fasterxml.jackson.core:jackson-annotations:2.6.7=compileClasspath,runtimeClasspath
5-
com.fasterxml.jackson.core:jackson-core:2.6.7=compileClasspath,runtimeClasspath
6-
com.fasterxml.jackson.core:jackson-databind:2.6.7.5=compileClasspath,runtimeClasspath
7-
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.6.7=compileClasspath,runtimeClasspath
8-
com.fasterxml.jackson:jackson-bom:2.6.7.5=compileClasspath,runtimeClasspath
4+
com.fasterxml.jackson.core:jackson-annotations:2.15.3=compileClasspath,runtimeClasspath
5+
com.fasterxml.jackson.core:jackson-core:2.15.3=compileClasspath,runtimeClasspath
6+
com.fasterxml.jackson.core:jackson-databind:2.15.3=compileClasspath,runtimeClasspath
7+
com.fasterxml.jackson.datatype:jackson-datatype-jdk8:2.15.3=compileClasspath,runtimeClasspath
8+
com.fasterxml.jackson:jackson-bom:2.15.3=compileClasspath,runtimeClasspath
99
javax.validation:validation-api:1.1.0.Final=compileClasspath,runtimeClasspath
1010
org.embulk:embulk-spi:0.11=compileClasspath
1111
org.msgpack:msgpack-core:0.8.24=compileClasspath

src/main/java/org/embulk/util/config/ConfigMapperFactory.java

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ public Builder withValidator(final Validator validator) {
137137
* Creates a {@link Builder} to build {@link ConfigMapperFactory}.
138138
*/
139139
public static Builder builder() {
140+
assertJacksonCoreVersion();
141+
assertJacksonDataBindVersion();
142+
assertJacksonDataTypeJdk8Version();
140143
return new Builder();
141144
}
142145

@@ -320,6 +323,39 @@ private ObjectMapper mapperForOthers() {
320323
return objectMapper;
321324
}
322325

326+
private static void assertJacksonCoreVersion() {
327+
if (com.fasterxml.jackson.core.json.PackageVersion.VERSION.getMajorVersion() != 2) {
328+
throw new UnsupportedOperationException("embulk-util-config is not used with Jackson 2.");
329+
}
330+
331+
final int minor = com.fasterxml.jackson.core.json.PackageVersion.VERSION.getMinorVersion();
332+
if (minor < 14 || (minor == 15 && com.fasterxml.jackson.core.json.PackageVersion.VERSION.getPatchLevel() <= 2)) {
333+
throw new UnsupportedOperationException("embulk-util-config is not used with Jackson (jackson-core) 2.15.3 or later.");
334+
}
335+
}
336+
337+
private static void assertJacksonDataBindVersion() {
338+
if (com.fasterxml.jackson.databind.cfg.PackageVersion.VERSION.getMajorVersion() != 2) {
339+
throw new UnsupportedOperationException("embulk-util-config is not used with Jackson 2.");
340+
}
341+
342+
final int minor = com.fasterxml.jackson.databind.cfg.PackageVersion.VERSION.getMinorVersion();
343+
if (minor < 14 || (minor == 15 && com.fasterxml.jackson.databind.cfg.PackageVersion.VERSION.getPatchLevel() <= 2)) {
344+
throw new UnsupportedOperationException("embulk-util-config is not used with Jackson (jackson-databind) 2.15.3 or later.");
345+
}
346+
}
347+
348+
private static void assertJacksonDataTypeJdk8Version() {
349+
if (com.fasterxml.jackson.datatype.jdk8.PackageVersion.VERSION.getMajorVersion() != 2) {
350+
throw new UnsupportedOperationException("embulk-util-config is not used with Jackson 2.");
351+
}
352+
353+
final int minor = com.fasterxml.jackson.datatype.jdk8.PackageVersion.VERSION.getMinorVersion();
354+
if (minor < 14 || (minor == 15 && com.fasterxml.jackson.datatype.jdk8.PackageVersion.VERSION.getPatchLevel() <= 2)) {
355+
throw new UnsupportedOperationException("embulk-util-config is not used with Jackson (jackson-datatype-jdk8) 2.15.3 or later.");
356+
}
357+
}
358+
323359
private static final Logger logger = LoggerFactory.getLogger(ConfigMapperFactory.class);
324360

325361
private final List<Module> additionalModules;

0 commit comments

Comments
 (0)