mirror of
https://github.com/LegacyModdingMC/UniMix.git
synced 2026-11-26 02:13:03 +00:00
Fix a bunch of small issues detected by using an intellij inspection
This commit is contained in:
1 parent
ec6fbf5f61
commit
3961a7cbf8
18 files changed
+33
-38
No files matched your search
+1
-4
@@ -75,10 +75,7 @@ class AnnotatedMixinElementHandlerInjector extends AnnotatedMixinElementHandler
|
||||
}
|
||||
|
||||
for (VariableElement param : this.element.getParameters()) {
|
||||
AnnotationHandle coerce = AnnotationHandle.of(param, Coerce.class);
|
||||
if (coerce != null) {
|
||||
return true;
|
||||
}
|
||||
return AnnotationHandle.of(param, Coerce.class).exists();
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
@@ -238,8 +238,7 @@ public final class TargetMap extends HashMap<TypeReference, Set<TypeReference>>
|
||||
try {
|
||||
streamIn = new FileInputStream(sessionFile);
|
||||
objectinputstream = new ObjectInputStream(streamIn);
|
||||
TargetMap map = (TargetMap)objectinputstream.readObject();
|
||||
return map;
|
||||
return (TargetMap)objectinputstream.readObject();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
} finally {
|
||||
|
||||
@@ -218,7 +218,7 @@ public class TypeHandle {
|
||||
* Get whether the element is probably public
|
||||
*/
|
||||
public boolean isPublic() {
|
||||
return this.getTargetElement() != null ? this.getTargetElement().getModifiers().contains(Modifier.PUBLIC) : false;
|
||||
return this.getTargetElement() != null && this.getTargetElement().getModifiers().contains(Modifier.PUBLIC);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user