Skip to content

version bumps, removed some warnings #1272

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 1, 2025
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
9 changes: 5 additions & 4 deletions application/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ dependencies {
implementation 'org.apache.logging.log4j:log4j-core:2.25.0'
runtimeOnly 'org.apache.logging.log4j:log4j-slf4j2-impl:2.25.0'

implementation 'club.minnced:discord-webhooks:0.8.2'
implementation 'club.minnced:discord-webhooks:0.8.4'

implementation "org.jooq:jooq:$jooqVersion"

Expand Down Expand Up @@ -81,15 +81,16 @@ dependencies {
implementation 'com.apptasticsoftware:rssreader:3.9.3'

testImplementation 'org.mockito:mockito-core:5.18.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.11.4'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.11.0'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.13.2'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.13.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.11.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.13.2'

implementation "com.theokanning.openai-gpt3-java:api:$chatGPTVersion"
implementation "com.theokanning.openai-gpt3-java:service:$chatGPTVersion"
}

application {
mainClass = 'org.togetherjava.tjbot.Application'
applicationDefaultJvmArgs = ["--enable-native-access=ALL-UNNAMED"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ private RendererUtils() {}

static String abortionCauseToString(JShellEvalAbortionCause abortionCause) {
return switch (abortionCause) {
case JShellEvalAbortionCause.TimeoutAbortionCause ignored -> "Allowed time exceeded.";
case JShellEvalAbortionCause.TimeoutAbortionCause _ -> "Allowed time exceeded.";
case JShellEvalAbortionCause.UnhandledExceptionAbortionCause(String exceptionClass, String exceptionMessage) ->
"Uncaught exception:\n" + exceptionClass + ":" + exceptionMessage;
case JShellEvalAbortionCause.CompileTimeErrorAbortionCause(List<String> errors) ->
"The code doesn't compile:\n" + String.join("\n", errors);
case JShellEvalAbortionCause.SyntaxErrorAbortionCause ignored ->
case JShellEvalAbortionCause.SyntaxErrorAbortionCause _ ->
"The code doesn't compile, there are syntax errors in this code.";
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ private void analyzeUrl(String url, AnalyseResults results) {
String host;
try {
host = URI.create(url).getHost();
} catch (IllegalArgumentException e) {
} catch (IllegalArgumentException _) {
// Invalid urls are not scam
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ private Optional<ZonedDateTime> getLastSavedDateFromDatabaseRecord(RssFeedRecord
ZonedDateTime savedDate =
getZonedDateTime(rssRecord.getLastDate(), dateFormatterPattern);
return Optional.of(savedDate);
} catch (DateTimeParseException e) {
} catch (DateTimeParseException _) {
return Optional.empty();
}
}
Expand Down Expand Up @@ -317,7 +317,7 @@ private static boolean isValidDateFormat(Item rssItem, RSSFeed feedConfig) {
// that the format pattern defined in the config and the
// feed's actual format differ.
getZonedDateTime(firstRssFeedPubDate.get(), feedConfig.dateFormatterPattern());
} catch (DateTimeParseException e) {
} catch (DateTimeParseException _) {
return false;
}
return true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ private static void sendSuccessMessage(IReplyCallback event, String id, String a
private static OptionalLong parseMessageIdAndHandle(String messageId, IReplyCallback event) {
try {
return OptionalLong.of(Long.parseLong(messageId));
} catch (NumberFormatException e) {
} catch (NumberFormatException _) {
event
.reply("The given message id '%s' is invalid, expected a number."
.formatted(messageId))
Expand Down Expand Up @@ -297,7 +297,7 @@ private Optional<String> getTagContent(Subcommand subcommand, String id) {
if (Subcommand.SUBCOMMANDS_WITH_PREVIOUS_CONTENT.contains(subcommand)) {
try {
return tagSystem.getTag(id);
} catch (NoSuchElementException e) {
} catch (NoSuchElementException _) {
// NOTE Rare race condition, for example if another thread deleted the tag in the
// meantime
logger.warn("Tried to retrieve content of tag '{}', but the content doesn't exist.",
Expand Down
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sonarqube {
}

// Install git hooks
task installLocalGitHook(type: Copy) {
tasks.register('installLocalGitHook', Copy) {
from new File(rootProject.rootDir, 'scripts/pre-commit')
into new File(rootProject.rootDir, '.git/hooks')
fileMode 0775
Expand Down Expand Up @@ -97,5 +97,4 @@ subprojects {
compileTestJava {
options.encoding = "UTF-8"
}

}
Loading