Cleaned up a lot of different inspections

This commit is contained in:
Nicholas Ignoffo 2018-03-01 19:27:38 -08:00
parent 0dd0854bd9
commit 70d98455b7
207 changed files with 603 additions and 731 deletions

View file

@ -231,9 +231,7 @@ public class Utils {
public static boolean isInteger(String integer) {
try {
Integer.parseInt(integer);
} catch (NumberFormatException e) {
return false;
} catch (NullPointerException e) {
} catch (NumberFormatException | NullPointerException e) {
return false;
}
// only got here if we didn't return false
@ -365,7 +363,7 @@ public class Utils {
public static float applyArmor(EntityLivingBase entity, ItemStack[] inventory, DamageSource source, double damage) {
damage *= 25;
ArrayList<ArmorProperties> dmgVals = new ArrayList<ArmorProperties>();
ArrayList<ArmorProperties> dmgVals = new ArrayList<>();
for (int x = 0; x < inventory.length; x++) {
ItemStack stack = inventory[x];
if (stack.isEmpty()) {