Skip to content

Commit de47524

Browse files
justin-taystevehu
andauthored
Update dependency versions (#1023)
Co-authored-by: Steve Hu <[email protected]>
1 parent d37e795 commit de47524

File tree

3 files changed

+38
-20
lines changed

3 files changed

+38
-20
lines changed

pom.xml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,27 @@
7171
<java.testversion>1.8</java.testversion>
7272
<java.version>1.8</java.version>
7373
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
74-
<version.hamcrest>2.2</version.hamcrest>
75-
<version.itu>1.8.0</version.itu>
74+
75+
<version.itu>1.10.2</version.itu>
7676
<version.jackson>2.17.0</version.jackson>
77-
<version.joni>2.1.41</version.joni>
78-
<version.junit>5.9.2</version.junit>
77+
<version.joni>2.2.1</version.joni>
7978
<version.logback>1.3.14</version.logback>
8079
<version.slf4j>2.0.13</version.slf4j>
81-
<version.surefire>3.0.0</version.surefire>
80+
81+
<version.hamcrest>2.2</version.hamcrest>
82+
<version.junit>5.10.2</version.junit>
8283
<version.undertow>2.2.31.Final</version.undertow>
84+
85+
<version.jacoco-maven-plugin>0.8.12</version.jacoco-maven-plugin>
86+
<version.maven-compiler-plugin>3.13.0</version.maven-compiler-plugin>
87+
<version.maven-bundle-plugin>5.1.9</version.maven-bundle-plugin>
88+
<version.maven-gpg-plugin>1.6</version.maven-gpg-plugin>
89+
<version.maven-javadoc-plugin>3.6.3</version.maven-javadoc-plugin>
90+
<version.maven-source-plugin>3.3.1</version.maven-source-plugin>
91+
<version.maven-surefire-junit5-tree-reporter>1.2.1</version.maven-surefire-junit5-tree-reporter>
92+
<version.maven-surefire-plugin>3.2.5</version.maven-surefire-plugin>
93+
<version.moditect-maven-plugin>1.2.1.Final</version.moditect-maven-plugin>
94+
<version.nexus-staging-maven-plugin>1.6.13</version.nexus-staging-maven-plugin>
8395
</properties>
8496

8597
<dependencies>
@@ -184,7 +196,7 @@
184196
<plugin>
185197
<groupId>org.apache.felix</groupId>
186198
<artifactId>maven-bundle-plugin</artifactId>
187-
<version>5.1.8</version>
199+
<version>${version.maven-bundle-plugin}</version>
188200
<extensions>true</extensions>
189201
<configuration>
190202
<instructions>
@@ -202,7 +214,7 @@
202214
<plugin>
203215
<groupId>org.sonatype.plugins</groupId>
204216
<artifactId>nexus-staging-maven-plugin</artifactId>
205-
<version>1.6.8</version>
217+
<version>${version.nexus-staging-maven-plugin}</version>
206218
<extensions>true</extensions>
207219
<configuration>
208220
<serverId>ossrh</serverId>
@@ -214,7 +226,7 @@
214226
<plugin>
215227
<groupId>org.apache.maven.plugins</groupId>
216228
<artifactId>maven-source-plugin</artifactId>
217-
<version>3.0.1</version>
229+
<version>${version.maven-source-plugin}</version>
218230
<executions>
219231
<execution>
220232
<id>attach-sources</id>
@@ -228,7 +240,7 @@
228240
<plugin>
229241
<groupId>org.apache.maven.plugins</groupId>
230242
<artifactId>maven-javadoc-plugin</artifactId>
231-
<version>3.4.0</version>
243+
<version>${version.maven-javadoc-plugin}</version>
232244
<executions>
233245
<execution>
234246
<id>attach-javadocs</id>
@@ -245,7 +257,7 @@
245257
<plugin>
246258
<groupId>org.apache.maven.plugins</groupId>
247259
<artifactId>maven-compiler-plugin</artifactId>
248-
<version>3.6.1</version>
260+
<version>${version.maven-compiler-plugin}</version>
249261
<configuration>
250262
<source>${java.version}</source>
251263
<target>${java.version}</target>
@@ -270,7 +282,7 @@
270282
<plugin>
271283
<groupId>org.apache.maven.plugins</groupId>
272284
<artifactId>maven-surefire-plugin</artifactId>
273-
<version>${version.surefire}</version>
285+
<version>${version.maven-surefire-plugin}</version>
274286
<configuration>
275287
<argLine>@{argLine} -Duser.language=en -Duser.region=GB</argLine>
276288
<reportFormat>plain</reportFormat>
@@ -291,15 +303,15 @@
291303
<dependency>
292304
<groupId>me.fabriciorby</groupId>
293305
<artifactId>maven-surefire-junit5-tree-reporter</artifactId>
294-
<version>1.1.0</version>
306+
<version>${version.maven-surefire-junit5-tree-reporter}</version>
295307
</dependency>
296308
</dependencies>
297309
</plugin>
298310

299311
<plugin>
300312
<groupId>org.jacoco</groupId>
301313
<artifactId>jacoco-maven-plugin</artifactId>
302-
<version>0.8.10</version>
314+
<version>${version.jacoco-maven-plugin}</version>
303315

304316
<configuration>
305317
<excludes>
@@ -346,7 +358,7 @@
346358
<plugin>
347359
<groupId>org.apache.maven.plugins</groupId>
348360
<artifactId>maven-surefire-report-plugin</artifactId>
349-
<version>${version.surefire}</version>
361+
<version>${version.maven-surefire-plugin}</version>
350362
</plugin>
351363
</plugins>
352364
</reporting>
@@ -366,7 +378,7 @@
366378
<plugin>
367379
<groupId>org.apache.maven.plugins</groupId>
368380
<artifactId>maven-gpg-plugin</artifactId>
369-
<version>1.6</version>
381+
<version>${version.maven-gpg-plugin}</version>
370382
<executions>
371383
<execution>
372384
<id>sign-artifacts</id>
@@ -391,7 +403,7 @@
391403
<plugin>
392404
<groupId>org.moditect</groupId>
393405
<artifactId>moditect-maven-plugin</artifactId>
394-
<version>1.0.0.Final</version>
406+
<version>${version.moditect-maven-plugin}</version>
395407
<executions>
396408
<execution>
397409
<id>add-module-infos</id>

src/test/java/com/networknt/schema/MaximumValidatorTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ public void negativeDoubleOverflowTest() throws IOException {
208208
v = factory.getSchema(bigDecimalMapper.readTree(schema), config);
209209
Set<ValidationMessage> messages3 = v.validate(doc);
210210
//when the schema and value are both using BigDecimal, the value should be parsed in same mechanism.
211-
if (maximum.toLowerCase().equals(value.toLowerCase()) || Double.valueOf(maximum).equals(Double.POSITIVE_INFINITY)) {
211+
String theValue = value.toLowerCase().replace("\"", "");
212+
if (maximum.toLowerCase().equals(theValue)) {
212213
assertTrue(messages3.isEmpty(), format("Maximum %s and value %s are equal, thus no schema violation should be reported", maximum, value));
213214
} else {
214215
assertFalse(messages3.isEmpty(), format("Maximum %s is smaller than value %s , should be validation error reported", maximum, value));
@@ -278,7 +279,9 @@ public void doubleValueCoarsingExceedRange() throws IOException {
278279
*/
279280
v = factory.getSchema(bigDecimalMapper.readTree(schema));
280281
messages = v.validate(doc);
281-
assertTrue(messages.isEmpty(), "Validation should success because the bug of bigDecimalMapper, it will treat 1.7976931348623159e+308 as INFINITY");
282+
// Before 2.16.0 messages will be empty due to bug https://github.com/FasterXML/jackson-databind/issues/1770
283+
// assertTrue(messages.isEmpty(), "Validation should success because the bug of bigDecimalMapper, it will treat 1.7976931348623159e+308 as INFINITY");
284+
assertFalse(messages.isEmpty(), "Validation should fail as Incorrect deserialization for BigDecimal numbers is fixed in 2.16.0");
282285
}
283286

284287
private static final String POSITIVE_TEST_CASE_TEMPLATE = "Expecting no validation errors, maximum %s is greater than value %s";

src/test/java/com/networknt/schema/MinimumValidatorTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,8 @@ public void negativeDoubleOverflowTest() throws IOException {
199199
v = factory.getSchema(bigDecimalMapper.readTree(schema), config);
200200
Set<ValidationMessage> messages3 = v.validate(doc);
201201
//when the schema and value are both using BigDecimal, the value should be parsed in same mechanism.
202-
if (minimum.toLowerCase().equals(value.toLowerCase()) || Double.valueOf(minimum).equals(Double.NEGATIVE_INFINITY)) {
202+
String theValue = value.toLowerCase().replace("\"", "");
203+
if (minimum.toLowerCase().equals(theValue)) {
203204
assertTrue(messages3.isEmpty(), format("Minimum %s and value %s are equal, thus no schema violation should be reported", minimum, value));
204205
} else {
205206
assertFalse(messages3.isEmpty(), format("Minimum %s is larger than value %s , should be validation error reported", minimum, value));
@@ -258,7 +259,9 @@ public void doubleValueCoarsingExceedRange() throws IOException {
258259

259260
v = factory.getSchema(bigDecimalMapper.readTree(schema));
260261
messages = v.validate(doc);
261-
assertTrue(messages.isEmpty(), "Validation should succeed due to the bug of BigDecimal option of mapper");
262+
// Before 2.16.0 messages will be empty due to bug https://github.com/FasterXML/jackson-databind/issues/1770
263+
//assertTrue(messages.isEmpty(), "Validation should succeed due to the bug of BigDecimal option of mapper");
264+
assertFalse(messages.isEmpty(), "Validation should fail as Incorrect deserialization for BigDecimal numbers is fixed in 2.16.0");
262265
}
263266

264267
private void expectSomeMessages(String[][] values, String number, ObjectMapper mapper, ObjectMapper mapper2) throws IOException {

0 commit comments

Comments
 (0)