From: Doni Pracner Date: Wed, 20 Apr 2016 16:05:58 +0000 (+0200) Subject: moved version.properties to a class subfolder to prevent conflicts X-Git-Tag: v0.2.1~6 X-Git-Url: https://svarog.pmf.uns.ac.rs/gitweb/?a=commitdiff_plain;h=f915cbc0f943d929c771714d7b2b19add6de158d;p=mjc2wsl.git 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. --- 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/com/quemaster/transformations/mjc2wsl/version.properties b/res/com/quemaster/transformations/mjc2wsl/version.properties new file mode 100644 index 0000000..c1a7627 --- /dev/null +++ b/res/com/quemaster/transformations/mjc2wsl/version.properties @@ -0,0 +1,2 @@ +#Mon, 18 Aug 2014 20:45:53 +0200 +version=v0.2.0 diff --git a/res/version.properties b/res/version.properties deleted file mode 100644 index c1a7627..0000000 --- a/res/version.properties +++ /dev/null @@ -1,2 +0,0 @@ -#Mon, 18 Aug 2014 20:45:53 +0200 -version=v0.2.0 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");