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: 3 additions & 1 deletion .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 25
java-version: 26

- name: Setup project and upload dependency graph
uses: gradle/actions/setup-gradle@v6
Expand Down Expand Up @@ -69,6 +69,8 @@ jobs:
use-caches: false
post-pr-comment: false
pr-mode: false
# bump: Qodana /qodana-jvm-community:([\d.]+)/ docker:jetbrains/qodana-jvm-community|/^[\d]{4}\.\d+$/|sort
args: --image jetbrains/qodana-jvm-community:2025.3

- name: Upload results to GitHub
uses: github/codeql-action/upload-sarif@v4
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM eclipse-temurin:25-alpine AS builder
FROM eclipse-temurin:26-alpine AS builder

WORKDIR /app

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ And it's done!

## How to set up the project

1. Install JDK 25 (or higher)
1. Install JDK 26 (or higher)
2. Clone the project and move into its folder
3. Run the command `./gradlew build -x test`
4. Import the project inside your IDE as a Gradle project
5. Ensure your IDE is correctly configured to use a Java 25 (or higher) JDK
5. Ensure your IDE is correctly configured to use a Java 26 (or higher) JDK

## How to run the bot locally

Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ version = '2.0'
description = 'Telegram bot to convert medias into the format required to be used as Telegram stickers'

java.toolchain {
languageVersion = JavaLanguageVersion.of(25)
languageVersion = JavaLanguageVersion.of(26)
vendor = JvmVendorSpec.ADOPTIUM
}

updateDaemonJvm {
languageVersion = JavaLanguageVersion.of(25)
languageVersion = JavaLanguageVersion.of(26)
vendor = JvmVendorSpec.ADOPTIUM
}

Expand Down
2 changes: 1 addition & 1 deletion buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ repositories {
}

java.toolchain {
languageVersion = JavaLanguageVersion.of(25)
languageVersion = JavaLanguageVersion.of(26)
vendor = JvmVendorSpec.ADOPTIUM
}
20 changes: 10 additions & 10 deletions gradle/gradle-daemon-jvm.properties
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#This file is generated by updateDaemonJvm
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/dcd2068273614ddddeba9b7cbf486173/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/c7dbcf54bacc4c888b93cc42ef334a2a/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/dcd2068273614ddddeba9b7cbf486173/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/c7dbcf54bacc4c888b93cc42ef334a2a/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/f2eb759b13be68e51cbe892c2e95efbe/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/9fafe4c46611108fb1379058ea84c17b/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/dcd2068273614ddddeba9b7cbf486173/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/c7dbcf54bacc4c888b93cc42ef334a2a/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/303c95a051768711e2ec6e0c82bc7dbb/redirect
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/39e8ce74cee3e629d6fade20d237fff5/redirect
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/b7f6da648647bf05d05a14cdca409f73/redirect
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/39e8ce74cee3e629d6fade20d237fff5/redirect
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b7f6da648647bf05d05a14cdca409f73/redirect
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/b5e76458e870841069679392d5855834/redirect
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/ef59bf670a5688da71dc8f2e9d1f8b76/redirect
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/39e8ce74cee3e629d6fade20d237fff5/redirect
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/b7f6da648647bf05d05a14cdca409f73/redirect
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/06340fb34ff0b1b2e0cde9562b75744e/redirect
toolchainVendor=ADOPTIUM
toolchainVersion=25
toolchainVersion=26
2 changes: 1 addition & 1 deletion qodana.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ include:
- name: VulnerableLibrariesGlobal
# bump: Qodana /qodana-jvm-community:([\d.]+)/ docker:jetbrains/qodana-jvm-community|/^[\d]{4}\.\d+$/|sort
linter: jetbrains/qodana-jvm-community:2025.3
projectJDK: temurin-25
projectJDK: temurin-26
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,7 @@ private static boolean isAnimatedStickerCompliant(File file, String mimeType) th
try {
var sticker = GSON.fromJson(uncompressedContent, AnimationDetails.class);

boolean isAnimationCompliant = isAnimationCompliant(sticker);
if (isAnimationCompliant) {
if (isAnimationCompliant(sticker)) {
try {
return Files.size(file.toPath()) <= MAX_ANIMATION_FILE_SIZE;
} catch (IOException e) {
Expand Down Expand Up @@ -504,6 +503,7 @@ private static String[] buildFfmpegCommand(String[] baseCommand, String... addit
var commands = new String[baseCommand.length + additionalOptions.length];
System.arraycopy(baseCommand, 0, commands, 0, baseCommand.length);
System.arraycopy(additionalOptions, 0, commands, baseCommand.length, additionalOptions.length);

return commands;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,8 @@ public final class ProcessHelper {
*/
public static String executeCommand(final String... command) throws ProcessException, InterruptedException {
SEMAPHORE.acquire();
try {
var process = new ProcessBuilder(command).redirectErrorStream(true).start();

try (var process = new ProcessBuilder(command).redirectErrorStream(true).start()) {
var output = new StringJoiner("\n");
var readerThread = Thread.ofVirtual().start(() -> {
try (var reader = process.inputReader(UTF_8)) {
Expand Down Expand Up @@ -73,6 +72,7 @@ private static int getMaxConcurrentProcesses() {
if (value < 1) {
throw new IllegalArgumentException("The environment variable CONCURRENT_PROCESSES must be >= 1 (was " + concurrentProcesses + ")");
}

return value;
}

Expand Down
Loading