Skip to content

Commit f206bd4

Browse files
Taz03Zabuzard
andauthored
Bump Java Version to 24 (#1071)
* rebase * upgrade to java 22 * downgraded workflow to java 21 * ignored -> _ * gradle wrapper * 8.8 * workflow * no ignored will get ignored * upgraded docker build java version * upgrade solarlint * . * . * . * . * for some reasons those files had unprintable characters at the beginning * Java 24 and other version bumps * suppressed some false positive sonars see bug report for details: https://community.sonarsource.com/t/a-nullpointerexception-could-be-thrown-ofnullable-can-return-null/134892 --------- Co-authored-by: Zabuzard <zabuza.dev@gmail.com>
1 parent 3bc3e7c commit f206bd4

30 files changed

+67
-59
lines changed

.github/workflows/basic-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Basic checks
33
on: [pull_request]
44

55
env:
6-
JAVA_VERSION: 21
6+
JAVA_VERSION: 24
77

88
jobs:
99
spotless:

.github/workflows/code-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
- cron: '0 20 * * 4'
99

1010
env:
11-
JAVA_VERSION: 21
11+
JAVA_VERSION: 24
1212

1313
jobs:
1414
sonar:

.github/workflows/docker-publish.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- 'master'
88

99
env:
10-
JAVA_VERSION: 21
10+
JAVA_VERSION: 24
1111

1212
jobs:
1313
docker:

.github/workflows/docker-verify.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Docker Verify
33
on: [pull_request]
44

55
env:
6-
JAVA_VERSION: 21
6+
JAVA_VERSION: 24
77

88
jobs:
99
docker:

.github/workflows/releases.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defaults:
1010
shell: bash
1111

1212
env:
13-
JAVA_VERSION: 21
13+
JAVA_VERSION: 24
1414

1515
jobs:
1616

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# TJ-Bot
22

33
[![codefactor](https://img.shields.io/codefactor/grade/github/together-java/tj-bot)](https://www.codefactor.io/repository/github/together-java/tj-bot)
4-
![Java](https://img.shields.io/badge/Java-21-ff696c)
4+
![Java](https://img.shields.io/badge/Java-24-ff696c)
55
[![license](https://img.shields.io/github/license/Together-Java/TJ-Bot)](https://github.com/Together-Java/TJ-Bot/blob/master/LICENSE)
66
![GitHub release (latest by date)](https://img.shields.io/github/v/release/Together-Java/TJ-Bot?label=release)
77

application/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ buildscript {
66

77
plugins {
88
id 'application'
9-
id 'com.google.cloud.tools.jib' version '3.4.0'
9+
id 'com.google.cloud.tools.jib' version '3.4.5'
1010
id 'com.github.johnrengelman.shadow' version '8.1.1'
1111
id 'database-settings'
1212
}
@@ -18,7 +18,7 @@ repositories {
1818
var outputImage = 'togetherjava.org:5001/togetherjava/tjbot:' + System.getenv('BRANCH_NAME') ?: 'latest'
1919

2020
jib {
21-
from.image = 'eclipse-temurin:21'
21+
from.image = 'eclipse-temurin:24'
2222
to {
2323
image = outputImage
2424
auth {

application/src/main/java/org/togetherjava/tjbot/features/code/CodeMessageHandler.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public void onMessageUpdated(MessageUpdateEvent event) {
224224

225225
// Re-apply the current action
226226
return codeReplyMessage.editMessageEmbeds(maybeCodeAction.orElseThrow().apply(code));
227-
}).queue(any -> {
227+
}).queue(_ -> {
228228
}, failure -> logger.warn(
229229
"Attempted to update a code-reply-message ({}), but failed. The original code-message was {}",
230230
codeReplyMessageId, originalMessageId, failure));
@@ -253,7 +253,7 @@ public void onMessageDeleted(MessageDeleteEvent event) {
253253
// Delete the code reply as well
254254
originalMessageToCodeReply.invalidate(originalMessageId);
255255

256-
event.getChannel().deleteMessageById(codeReplyMessageId).queue(any -> {
256+
event.getChannel().deleteMessageById(codeReplyMessageId).queue(_ -> {
257257
}, failure -> logger.warn(
258258
"Attempted to delete a code-reply-message ({}), but failed. The original code-message was {}",
259259
codeReplyMessageId, originalMessageId, failure));

application/src/main/java/org/togetherjava/tjbot/features/componentids/ComponentIdStore.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public void addComponentIdRemovedListener(Consumer<ComponentId> listener) {
165165
* @throws InvalidComponentIdFormatException if the given component ID was in an unexpected
166166
* format and could not be serialized
167167
*/
168-
@SuppressWarnings("WeakerAccess")
168+
@SuppressWarnings({"WeakerAccess", "squid:S2259"})
169169
public Optional<ComponentId> get(UUID uuid) {
170170
synchronized (storeLock) {
171171
// Get it from the cache or, if not found, the database

application/src/main/java/org/togetherjava/tjbot/features/github/GitHubReference.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ Optional<GHIssue> findIssue(int id, String targetIssueTitle) {
236236
if (issue.getTitle().equals(targetIssueTitle)) {
237237
return Optional.of(issue);
238238
}
239-
} catch (FileNotFoundException ignored) {
239+
} catch (FileNotFoundException _) {
240240
return Optional.<GHIssue>empty();
241241
} catch (IOException ex) {
242242
throw new UncheckedIOException(ex);
@@ -255,7 +255,7 @@ Optional<GHIssue> findIssue(int id, long defaultRepoId) {
255255
issue = repository.getPullRequest(id);
256256
}
257257
return Optional.of(issue);
258-
} catch (FileNotFoundException ignored) {
258+
} catch (FileNotFoundException _) {
259259
return Optional.<GHIssue>empty();
260260
} catch (IOException ex) {
261261
throw new UncheckedIOException(ex);

0 commit comments

Comments
 (0)