Skip to content

Commit 3de9eb5

Browse files
authored
Merge pull request #25 from cortexapps/aw/jackson-2-21-naming
GitLab client runs on Jackson 2.21
2 parents 8b2a714 + e67fb75 commit 3de9eb5

5 files changed

Lines changed: 33 additions & 25 deletions

File tree

‎.github/workflows/ci-build.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,22 +20,22 @@ jobs:
2020
ports:
2121
- 8090:80
2222
steps:
23-
- uses: actions/checkout@v2
23+
- uses: actions/checkout@v4
2424
with:
2525
fetch-depth: 0
2626
- name: Set up JDK 11
27-
uses: actions/setup-java@v2
27+
uses: actions/setup-java@v4
2828
with:
29-
distribution: adopt-hotspot
29+
distribution: temurin
3030
java-version: 11
3131
- name: Get Date
3232
id: get-date
3333
run: |
34-
echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
34+
echo "date=$(/bin/date -u "+%Y-%m")" >> "$GITHUB_OUTPUT"
3535
shell: bash
3636
- name: Cache Maven Repository
3737
id: cache-maven
38-
uses: actions/cache@v2
38+
uses: actions/cache@v4
3939
with:
4040
path: ~/.m2/repository
4141
# refresh cache every month to avoid unlimited growth

‎.github/workflows/ci-publish.yml‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,22 +15,22 @@ jobs:
1515
ports:
1616
- 8090:80
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919
with:
2020
fetch-depth: 0
2121
- name: Set up JDK 11
22-
uses: actions/setup-java@v2
22+
uses: actions/setup-java@v4
2323
with:
24-
distribution: adopt-hotspot
24+
distribution: temurin
2525
java-version: 11
2626
- name: Get Date
2727
id: get-date
2828
run: |
29-
echo "::set-output name=date::$(/bin/date -u "+%Y-%m")"
29+
echo "date=$(/bin/date -u "+%Y-%m")" >> "$GITHUB_OUTPUT"
3030
shell: bash
3131
- name: Cache Maven Repository
3232
id: cache-maven
33-
uses: actions/cache@v2
33+
uses: actions/cache@v4
3434
with:
3535
path: ~/.m2/repository
3636
# refresh cache every month to avoid unlimited growth
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.6.1/apache-maven-3.6.1-bin.zip
1+
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.9.16/apache-maven-3.9.16-bin.zip
22

‎pom.xml‎

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<groupId>org.gitlab4j</groupId>
66
<artifactId>gitlab4j-api-cortex</artifactId>
77
<packaging>jar</packaging>
8-
<version>6.0.4</version>
8+
<version>6.0.5</version>
99
<name>GitLab4J-API - GitLab API Java Client</name>
1010
<description>GitLab4J-API (gitlab4j-api) provides a full featured Java client library for working with GitLab repositories and servers via the GitLab REST API.</description>
1111
<url>https://github.com/gitlab4j/gitlab4j-api</url>
@@ -52,14 +52,14 @@
5252
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5353
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5454

55-
<jersey.version>3.1.1</jersey.version>
56-
<jackson.version>2.14.1</jackson.version>
55+
<jersey.version>3.1.12</jersey.version>
56+
<jackson.version>2.21.8</jackson.version>
5757
<servlet.version>6.0.0</servlet.version>
58-
<activation.version>2.1.1</activation.version>
58+
<activation.version>2.1.4</activation.version>
5959

60-
<junit.version>5.8.2</junit.version>
60+
<junit.version>5.14.4</junit.version>
6161
<testcontainers.version>1.15.3</testcontainers.version>
62-
<mockito.version>4.4.0</mockito.version>
62+
<mockito.version>4.11.0</mockito.version>
6363
<hamcrest.version>1.3</hamcrest.version>
6464
<systemRules.version>1.19.0</systemRules.version>
6565

@@ -259,7 +259,7 @@
259259
<plugin>
260260
<groupId>org.apache.maven.plugins</groupId>
261261
<artifactId>maven-enforcer-plugin</artifactId>
262-
<version>3.0.0-M2</version>
262+
<version>3.6.2</version>
263263
<configuration>
264264
<rules>
265265
<enforceBytecodeVersion>
@@ -282,7 +282,7 @@
282282
<dependency>
283283
<groupId>org.codehaus.mojo</groupId>
284284
<artifactId>extra-enforcer-rules</artifactId>
285-
<version>1.3</version>
285+
<version>1.12.1</version>
286286
</dependency>
287287
</dependencies>
288288
</plugin>
@@ -389,13 +389,13 @@
389389
<dependency>
390390
<groupId>uk.org.webcompere</groupId>
391391
<artifactId>system-stubs-jupiter</artifactId>
392-
<version>1.2.0</version>
392+
<version>2.1.8</version>
393393
<scope>test</scope>
394394
</dependency>
395395
<dependency>
396396
<groupId>org.jboss.resteasy</groupId>
397397
<artifactId>resteasy-client</artifactId>
398-
<version>6.2.3.Final</version>
398+
<version>6.2.19.Final</version>
399399
</dependency>
400400
<dependency>
401401
<groupId>net.ltgt.jaxrs</groupId>
@@ -411,12 +411,20 @@
411411
<dependency>
412412
<groupId>com.squareup.okhttp3</groupId>
413413
<artifactId>okhttp</artifactId>
414-
<version>4.9.3</version>
414+
<version>4.12.0</version>
415415
</dependency>
416416
</dependencies>
417417

418418
<dependencyManagement>
419419
<dependencies>
420+
<!-- Align Jersey's transitive Jackson with the version brain-backend runs -->
421+
<dependency>
422+
<groupId>com.fasterxml.jackson</groupId>
423+
<artifactId>jackson-bom</artifactId>
424+
<version>${jackson.version}</version>
425+
<type>pom</type>
426+
<scope>import</scope>
427+
</dependency>
420428
<!-- Needed for animal-sniffer -->
421429
<dependency>
422430
<groupId>org.codehaus.mojo.signature</groupId>

‎src/main/java/org/gitlab4j/api/utils/JacksonJson.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
import com.fasterxml.jackson.databind.JsonSerializer;
3434
import com.fasterxml.jackson.databind.ObjectMapper;
3535
import com.fasterxml.jackson.databind.ObjectWriter;
36-
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
36+
import com.fasterxml.jackson.databind.PropertyNamingStrategies;
3737
import com.fasterxml.jackson.databind.SerializationFeature;
3838
import com.fasterxml.jackson.databind.SerializerProvider;
3939
import com.fasterxml.jackson.databind.module.SimpleModule;
@@ -59,7 +59,7 @@ public JacksonJson() {
5959
objectMapper = new ObjectMapper();
6060

6161
objectMapper.setSerializationInclusion(Include.NON_NULL);
62-
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
62+
objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.SNAKE_CASE);
6363

6464
objectMapper.configure(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS, false);
6565
objectMapper.configure(SerializationFeature.WRITE_ENUMS_USING_TO_STRING, true);
@@ -349,7 +349,7 @@ public List<User> deserialize(JsonParser jsonParser, DeserializationContext cont
349349
private static class JacksonJsonSingletonHelper {
350350
private static final JacksonJson JACKSON_JSON = new JacksonJson();
351351
static {
352-
JACKSON_JSON.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategy.LOWER_CAMEL_CASE);
352+
JACKSON_JSON.objectMapper.setPropertyNamingStrategy(PropertyNamingStrategies.LOWER_CAMEL_CASE);
353353
JACKSON_JSON.objectMapper.setSerializationInclusion(Include.ALWAYS);
354354
}
355355
}

0 commit comments

Comments
 (0)