From f915cbc0f943d929c771714d7b2b19add6de158d Mon Sep 17 00:00:00 2001 From: Doni Pracner Date: Wed, 20 Apr 2016 18:05:58 +0200 Subject: [PATCH] moved version.properties to a class subfolder to prevent conflicts updated the version name loader, removed error displays since they are irrelevant. updates to the ant build to reflect the new name. --- build.xml | 4 +++- .../quemaster/transformations/mjc2wsl}/version.properties | 0 src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java | 7 ++++--- 3 files changed, 7 insertions(+), 4 deletions(-) rename res/{ => com/quemaster/transformations/mjc2wsl}/version.properties (100%) diff --git a/build.xml b/build.xml index fc76dd0..2f6f580 100644 --- a/build.xml +++ b/build.xml @@ -64,7 +64,7 @@ - + @@ -159,6 +159,8 @@ + + diff --git a/res/version.properties b/res/com/quemaster/transformations/mjc2wsl/version.properties similarity index 100% rename from res/version.properties rename to res/com/quemaster/transformations/mjc2wsl/version.properties diff --git a/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java b/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java index 2ba758b..ce82101 100644 --- a/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java +++ b/src/com/quemaster/transformations/mjc2wsl/mjc2wsl.java @@ -42,7 +42,7 @@ public class mjc2wsl{ //default version name, used if the file is not found private static String versionN = "v0.2.x"; - private String versionFile = "/version.properties"; + private String versionFile = "version.properties"; private TransMessages messages = new TransMessages(); @@ -137,8 +137,9 @@ public class mjc2wsl{ versionData = new Properties(); try { versionData.load(getClass().getResourceAsStream(versionFile)); - } catch (IOException e) { - e.printStackTrace(); + } catch (IOException | NullPointerException e) { + // it doesn't matter + //e.printStackTrace(); } } String ver = versionData.getProperty("version"); -- 2.25.1