mirror of
https://git.krews.org/morningstar/Arcturus-Community.git
synced 2024-11-22 23:10:52 +01:00
Fixed Possible NPE's with System.getProperty
This commit is contained in:
parent
86cf51ab05
commit
c78813a405
@ -32,8 +32,8 @@ import java.util.regex.Pattern;
|
||||
public final class Emulator {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(Emulator.class);
|
||||
private static final String OS_NAME = System.getProperty("os.name");
|
||||
private static final String CLASS_PATH = System.getProperty("java.class.path");
|
||||
private static final String OS_NAME = (System.getProperty("os.name") != null ? System.getProperty("os.name") : "Unknown");
|
||||
private static final String CLASS_PATH = (System.getProperty("java.class.path") != null ? System.getProperty("java.class.path") : "Unknown");
|
||||
|
||||
public final static int MAJOR = 3;
|
||||
public final static int MINOR = 0;
|
||||
|
@ -22,8 +22,11 @@ public class WiredHighscoreManager {
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(WiredHighscoreManager.class);
|
||||
|
||||
private final HashMap<Integer, List<WiredHighscoreDataEntry>> data = new HashMap<>();
|
||||
|
||||
private final static String locale = (System.getProperty("user.language") != null ? System.getProperty("user.language") : "en");
|
||||
private final static String country = (System.getProperty("user.country") != null ? System.getProperty("user.country") : "US");
|
||||
|
||||
private final static DayOfWeek firstDayOfWeek = WeekFields.of(new Locale(System.getProperty("user.language"), System.getProperty("user.country"))).getFirstDayOfWeek();
|
||||
private final static DayOfWeek firstDayOfWeek = WeekFields.of(new Locale(locale, country)).getFirstDayOfWeek();
|
||||
private final static DayOfWeek lastDayOfWeek = DayOfWeek.of(((firstDayOfWeek.getValue() + 5) % DayOfWeek.values().length) + 1);
|
||||
private final static ZoneId zoneId = ZoneId.systemDefault();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user