diff --git a/src/main/java/w2phtml/api/ConverterFactory.java b/src/main/java/w2phtml/api/ConverterFactory.java index 34ca0f8..e65c3a8 100644 --- a/src/main/java/w2phtml/api/ConverterFactory.java +++ b/src/main/java/w2phtml/api/ConverterFactory.java @@ -47,8 +47,10 @@ public class ConverterFactory { InputStream stream = loader.getResourceAsStream(propPath); String version = "Failed to get version"; try { - prop.load(stream); - version = (String) prop.get("releaseVersion"); + if (stream != null) { + prop.load(stream); + version = (String) prop.get("releaseVersion"); + } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -65,8 +67,10 @@ public class ConverterFactory { InputStream stream = loader.getResourceAsStream(propPath); String date = "Failed to get date"; try { - prop.load(stream); - date = (String) prop.get("releaseDate"); + if (stream != null) { + prop.load(stream); + date = (String) prop.get("releaseDate"); + } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace();