fix ExceptionInInitializerError
This commit is contained in:
@@ -94,7 +94,7 @@ public class Library implements Comparable<Library>, Validation {
|
||||
public String getClassifier() {
|
||||
if (artifact.getClassifier() == null)
|
||||
if (natives != null && natives.containsKey(OperatingSystem.CURRENT_OS))
|
||||
return natives.get(OperatingSystem.CURRENT_OS).replace("${arch}", Platform.PLATFORM.getBit());
|
||||
return natives.get(OperatingSystem.CURRENT_OS).replace("${arch}", Platform.getPlatform().getBit());
|
||||
else
|
||||
return null;
|
||||
else
|
||||
|
||||
@@ -165,7 +165,7 @@ public final class JavaVersion {
|
||||
CURRENT_JAVA = new JavaVersion(
|
||||
currentExecutable,
|
||||
System.getProperty("java.version"),
|
||||
Platform.PLATFORM);
|
||||
Platform.getPlatform());
|
||||
}
|
||||
|
||||
private static Collection<JavaVersion> JAVAS;
|
||||
|
||||
@@ -47,7 +47,9 @@ public enum Platform {
|
||||
/**
|
||||
* The platform of current Java Environment.
|
||||
*/
|
||||
public static final Platform PLATFORM = Architecture.CURRENT.getPlatform();
|
||||
public static Platform getPlatform() {
|
||||
return Architecture.CURRENT.getPlatform();
|
||||
}
|
||||
|
||||
/**
|
||||
* The json serializer to {@link Platform}.
|
||||
|
||||
Reference in New Issue
Block a user