-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #325 from JarvisCraft/1.0.0-rc.9
- Loading branch information
Showing
11 changed files
with
52 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,19 +22,19 @@ jobs: | |
- uses: actions/[email protected] | ||
|
||
- name: Set up Java 17 | ||
uses: actions/setup-java@v2.4.0 | ||
uses: actions/setup-java@v2.5.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
cache: 'maven' | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/[email protected].26 | ||
uses: github/codeql-action/[email protected].31 | ||
with: | ||
languages: java | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/[email protected].26 | ||
uses: github/codeql-action/[email protected].31 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/[email protected].26 | ||
uses: github/codeql-action/[email protected].31 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
- uses: actions/[email protected] | ||
|
||
- name: Set up Java 17 & Deployment credentials | ||
uses: actions/setup-java@v2.4.0 | ||
uses: actions/setup-java@v2.5.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
|
@@ -27,7 +27,7 @@ jobs: | |
- uses: jactions/[email protected] | ||
id: get_version | ||
|
||
- name: Deploy snapshot | ||
- name: Deploy release | ||
if: ${{ !endsWith(steps.get_version.outputs.version, '-SNAPSHOT') }} | ||
run: mvn deploy -B -P build-extras,sign-artifacts,automatic-central-release | ||
env: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ jobs: | |
- uses: actions/[email protected] | ||
|
||
- name: Set up Java 17 & Deployment credentials | ||
uses: actions/setup-java@v2.4.0 | ||
uses: actions/setup-java@v2.5.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ jobs: | |
- uses: actions/[email protected] | ||
|
||
- name: Set up Java 17 | ||
uses: actions/setup-java@v2.4.0 | ||
uses: actions/setup-java@v2.5.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
|
@@ -28,7 +28,7 @@ jobs: | |
- uses: actions/[email protected] | ||
|
||
- name: Set up Java 17 | ||
uses: actions/setup-java@v2.4.0 | ||
uses: actions/setup-java@v2.5.0 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
java-commons/src/main/java/ru/progrm_jarvis/javacommons/util/function/ThrowingConsumer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package ru.progrm_jarvis.javacommons.util.function; | ||
|
||
import lombok.SneakyThrows; | ||
|
||
import java.util.function.Consumer; | ||
|
||
/** | ||
* An extension of {@link Consumer} allowing throwing calls in its body. | ||
* | ||
* @param <T> the type of the input to the operation | ||
* @param <X> the type of the exception thrown by the function | ||
*/ | ||
@FunctionalInterface | ||
public interface ThrowingConsumer<T, X extends Throwable> extends Consumer<T> { | ||
|
||
/** | ||
* Performs this operation on the given argument. | ||
* | ||
* @param t the input argument | ||
* @throws X if an exception happens | ||
*/ | ||
void acceptChecked(T t) throws X; | ||
|
||
@Override | ||
@SneakyThrows | ||
default void accept(final T t) { | ||
acceptChecked(t); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters