From 20fa3573bbcf6ccbd009a96fa5ee84c53ef157d8 Mon Sep 17 00:00:00 2001 From: empirephoenix Date: Mon, 12 Feb 2018 18:44:02 +0100 Subject: [PATCH] Update JmeVersion.java If the properties file is missing, it will actually crash with an NPE instead of an IO exception. continue as original intended. Exception in thread "main" java.lang.ExceptionInInitializerError at com.jme3.system.AppSettings.(AppSettings.java:222) at com.jme3.app.SimpleApplication.start(SimpleApplication.java:113) at Test.main(Test.java:12) Caused by: java.lang.NullPointerException: while trying to invoke the method java.io.Reader.read(char[]) of a null object loaded from field java.util.Properties$LineReader.reader of an object loaded from local variable 'this' at java.util.Properties$LineReader.readLine(Properties.java:450) at java.util.Properties.load0(Properties.java:369) at java.util.Properties.load(Properties.java:357) at com.jme3.system.JmeVersion.(JmeVersion.java:51) ... 3 more --- jme3-core/src/main/java/com/jme3/system/JmeVersion.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jme3-core/src/main/java/com/jme3/system/JmeVersion.java b/jme3-core/src/main/java/com/jme3/system/JmeVersion.java index 0492df950..c7d8e3860 100644 --- a/jme3-core/src/main/java/com/jme3/system/JmeVersion.java +++ b/jme3-core/src/main/java/com/jme3/system/JmeVersion.java @@ -49,7 +49,7 @@ public class JmeVersion { static { try { props.load(JmeVersion.class.getResourceAsStream("version.properties")); - } catch (IOException ex) { + } catch (Exception ex) { logger.log(Level.WARNING, "Unable to read version info!", ex); } }