Skip to content

Commit

Permalink
Merge pull request #137 from baloise/java17
Browse files Browse the repository at this point in the history
feat(CHIST-9921): fix java17
  • Loading branch information
schlijo authored Aug 12, 2024
2 parents da84b74 + c4cc7cb commit de1560e
Show file tree
Hide file tree
Showing 24 changed files with 66 additions and 58 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Set up JDK 1.8
uses: actions/setup-java@v1
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
java-version: 1.8
distribution: 'temurin'
java-version: 17
cache: 'maven'
- name: Build with Maven
run: mvn clean verify --file pom.xml
4 changes: 3 additions & 1 deletion .idea/encodings.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 16 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
</organization>

<groupId>ch.baloise.corellia</groupId>
<artifactId>api</artifactId>
<artifactId>api-jakarta</artifactId>
<version>3.0.0</version>
<packaging>jar</packaging>

Expand Down Expand Up @@ -52,11 +52,10 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<swagger.version>2.1.0</swagger.version>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<swagger.version>2.2.22</swagger.version>
<jackson.version>2.10.0.pr1</jackson.version>
<javax.ws.rs-api.version>2.1</javax.ws.rs-api.version>
</properties>


Expand Down Expand Up @@ -103,7 +102,7 @@
<dependencies>
<dependency>
<groupId>io.swagger.core.v3</groupId>
<artifactId>swagger-jaxrs2</artifactId>
<artifactId>swagger-jaxrs2-jakarta</artifactId>
<scope>compile</scope>
<version>${swagger.version}</version>
<optional>true</optional>
Expand All @@ -127,21 +126,26 @@
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>${javax.ws.rs-api.version}</version>
<groupId>jakarta.ws.rs</groupId>
<artifactId>jakarta.ws.rs-api</artifactId>
<version>4.0.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>2.0.13</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<version>6.1.0</version>
<optional>true</optional>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
import io.swagger.v3.oas.annotations.media.Content;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import javax.ws.rs.Consumes;
import javax.ws.rs.GET;
import javax.ws.rs.HeaderParam;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.HeaderParam;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.core.MediaType;

@Path("/contracts")
@Consumes(MediaType.APPLICATION_JSON + "; charset=UTF-8")
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ch/baloise/corellia/api/entities/Action.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import java.time.LocalDate;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

public class Action {

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ch/baloise/corellia/api/entities/Address.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import java.io.Serializable;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

public class Address implements Serializable {

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ch/baloise/corellia/api/entities/Agent.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import com.fasterxml.jackson.annotation.JsonPropertyDescription;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.io.Serializable;

import static ch.baloise.corellia.api.constraints.SizeConstraint.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package ch.baloise.corellia.api.entities;

import java.io.Serializable;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;

public class Cancellation implements Serializable {

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ch/baloise/corellia/api/entities/Company.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
import com.fasterxml.jackson.annotation.JsonValue;
import java.io.Serializable;
import java.util.Arrays;
import javax.validation.Valid;
import javax.validation.constraints.Size;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Size;

public class Company implements Serializable {

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/ch/baloise/corellia/api/entities/Contract.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
import java.io.Serializable;
import java.time.LocalDate;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

public class Contract implements Serializable {

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/ch/baloise/corellia/api/entities/Coverable.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import java.io.Serializable;
import java.util.List;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

public class Coverable implements Serializable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import com.fasterxml.jackson.annotation.JsonPropertyDescription;

import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import java.io.Serializable;

public class Coverage implements Serializable {
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ch/baloise/corellia/api/entities/Document.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import org.apache.commons.lang3.StringUtils;

public class Document implements Serializable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import java.util.List;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

public class ErrorResponse {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import com.fasterxml.jackson.annotation.JsonPropertyDescription;

import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

public class FileHandle {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.function.Function;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import org.apache.commons.lang3.StringUtils;

public class Identifier {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import com.fasterxml.jackson.annotation.JsonPropertyDescription;

import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;

public class MonetaryAmount {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import java.time.LocalDate;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

public class Payment {

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ch/baloise/corellia/api/entities/Person.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import java.io.Serializable;
import java.time.LocalDate;
import javax.validation.Valid;
import javax.validation.constraints.Size;
import jakarta.validation.Valid;
import jakarta.validation.constraints.Size;

public class Person implements Serializable {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

import com.fasterxml.jackson.annotation.JsonPropertyDescription;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;

import static ch.baloise.corellia.api.constraints.SizeConstraint.PHONE_NUMBER_MAX_SIZE;
import static ch.baloise.corellia.api.constraints.SizeConstraint.PHONE_NUMBER_MIN_SIZE;
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/ch/baloise/corellia/api/entities/Product.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@

import com.fasterxml.jackson.annotation.JsonPropertyDescription;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import java.io.Serializable;
import java.util.List;

Expand Down
4 changes: 2 additions & 2 deletions src/main/java/ch/baloise/corellia/api/entities/Role.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package ch.baloise.corellia.api.entities;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import jakarta.validation.Valid;
import jakarta.validation.constraints.NotNull;
import java.io.Serializable;

public class Role implements Serializable {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ch.baloise.corellia.api.entities;

import com.fasterxml.jackson.annotation.JsonPropertyDescription;
import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;

public class TermsOfService {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import com.fasterxml.jackson.annotation.JsonPropertyDescription;

import javax.validation.constraints.NotNull;
import jakarta.validation.constraints.NotNull;
import java.util.Objects;

public class Version {
Expand Down

0 comments on commit de1560e

Please sign in to comment.