Refactored and reformatted code to use less static variables

This commit is contained in:
CrushedPixel
2015-04-23 14:09:54 +02:00
parent f22416be2c
commit 0003f040ed
109 changed files with 9037 additions and 10229 deletions

View File

@@ -2,19 +2,19 @@ package eu.crushedpixel.replaymod.studio;
public class VersionValidator {
public static final boolean isValid;
static {
String version = Runtime.class.getPackage().getSpecificationVersion();
if(version != null) {
String[] split = version.split("\\.");
if(split.length > 1) {
isValid = Integer.valueOf(split[1]) >= 7;
} else {
isValid = false;
}
} else {
isValid = false;
}
}
public static final boolean isValid;
static {
String version = Runtime.class.getPackage().getSpecificationVersion();
if(version != null) {
String[] split = version.split("\\.");
if(split.length > 1) {
isValid = Integer.valueOf(split[1]) >= 7;
} else {
isValid = false;
}
} else {
isValid = false;
}
}
}