code inspection fixes

This commit is contained in:
FalsePattern committed 2022-06-08 16:06:35 +02:00
1 parent a506a88df0
commit 95318b26ac
4 files changed
+14 -5

No files matched your search

@@ -102,8 +102,8 @@ public interface IMixinPlugin extends IMixinConfigPlugin {
IMixin[] getMixinEnumValues();
static File findJarOf(final ITargetedMod mod) {
try {
return walk(MODS_DIRECTORY_PATH).filter(mod::isMatchingJar).map(Path::toFile).findFirst().orElse(null);
try (val stream = walk(MODS_DIRECTORY_PATH)) {
return stream.filter(mod::isMatchingJar).map(Path::toFile).findFirst().orElse(null);
} catch (IOException e) {
e.printStackTrace();
return null;