mirror of
https://github.com/FalsePattern/FalsePatternLib.git
synced 2026-11-21 11:32:15 +00:00
code inspection fixes
This commit is contained in:
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;
|
||||
|
||||
@@ -10,6 +10,7 @@ public interface ITargetedMod {
|
||||
|
||||
boolean isLoadInDevelopment();
|
||||
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
default boolean isMatchingJar(Path path) {
|
||||
String pathString = path.toString();
|
||||
String nameLowerCase = Files.getNameWithoutExtension(pathString).toLowerCase();
|
||||
|
||||
Reference in new issue
Block a user