Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@

jobs:
build:
uses: valitydev/java-workflow/.github/workflows/maven-library-build.yml@v3
uses: valitydev/java-workflow/.github/workflows/maven-library-build.yml@v4
with:
java-version: "17"
java-version: "25"

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Comment thread
echerniak marked this conversation as resolved.
Dismissed
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@

jobs:
deploy:
uses: valitydev/java-workflow/.github/workflows/maven-library-deploy.yml@v3
uses: valitydev/java-workflow/.github/workflows/maven-library-deploy.yml@v4
with:
java-version: "17"
java-version: "25"
secrets:
server-username: ${{ secrets.OSSRH_USERNAME }}
server-password: ${{ secrets.OSSRH_TOKEN }}
deploy-secret-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
deploy-secret-key-password: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
mm-webhook-url: ${{ secrets.MATTERMOST_WEBHOOK_URL }}

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
78 changes: 59 additions & 19 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
<parent>
<groupId>dev.vality</groupId>
<artifactId>library-parent-pom</artifactId>
<version>3.1.0</version>
<version>4.0.0</version>
</parent>

<artifactId>error-mapping-java-v2</artifactId>
<version>0.0.4</version>
<version>1.0.0</version>
<packaging>jar</packaging>

<name>error-mapping-java-v2</name>
Expand Down Expand Up @@ -40,25 +40,38 @@
</scm>

<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<jackson.version>2.17.1</jackson.version>
<lombok.version>1.18.32</lombok.version>
<jackson.version>3.2.0</jackson.version>
<lombok.version>1.18.46</lombok.version>
<geck.version>1.0.2</geck.version>
<woody.version>2.1.0</woody.version>
<damsel.version>1.668-8cab698</damsel.version>
<woody.version>3.0.0</woody.version>
<damsel.version>1.698-99c91c9</damsel.version>
<junit.version>6.1.0</junit.version>
<maven-compiler-plugin.version>3.15.0</maven-compiler-plugin.version>
<maven-surefire-plugin.version>3.5.6</maven-surefire-plugin.version>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>tools.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>${jackson.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>dev.vality.woody</groupId>
<artifactId>woody-thrift</artifactId>
<artifactId>woody-api</artifactId>
<version>${woody.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dev.vality.woody</groupId>
<artifactId>woody-api</artifactId>
<artifactId>libthrift</artifactId>
<version>${woody.version}</version>
<scope>provided</scope>
</dependency>
Expand All @@ -81,29 +94,56 @@
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson.version}</version>
<groupId>tools.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
<artifactId>jackson-annotations</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.10.3</version>
<artifactId>junit-jupiter</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
</plugin>
</plugins>
</pluginManagement>

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<proc>full</proc>
<annotationProcessorPaths>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
package dev.vality.adapter.common.v2.mapper;

import com.fasterxml.jackson.core.JsonParseException;
import com.fasterxml.jackson.core.type.TypeReference;
import com.fasterxml.jackson.databind.JsonMappingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import dev.vality.adapter.common.v2.exception.ErrorMappingException;
import dev.vality.adapter.common.v2.mapper.model.Error;
import dev.vality.adapter.common.v2.mapper.model.MappingExceptions;
import dev.vality.damsel.domain.Failure;
import dev.vality.geck.serializer.kit.tbase.TErrorUtil;
import dev.vality.woody.api.flow.error.*;
import tools.jackson.core.JacksonException;
import tools.jackson.core.exc.StreamReadException;
import tools.jackson.core.type.TypeReference;
import tools.jackson.databind.DatabindException;
import tools.jackson.databind.ObjectMapper;

import java.io.IOException;
import java.io.InputStream;
import java.nio.charset.CharsetEncoder;
import java.nio.charset.StandardCharsets;
Expand Down Expand Up @@ -69,11 +69,11 @@ private static List<Error> initErrorList(InputStream inputStream, ObjectMapper o
inputStream,
new TypeReference<>() {
});
} catch (JsonParseException e) {
} catch (StreamReadException e) {
throw new ErrorMappingException("Json can't parse data from file", e);
} catch (JsonMappingException e) {
} catch (DatabindException e) {
throw new ErrorMappingException("Json can't mapping data from file", e);
} catch (IOException e) {
} catch (JacksonException e) {
throw new ErrorMappingException("Failed to initErrorList", e);
}
}
Expand Down
Loading