Mercurial > hg > release > thermostat-0.4
changeset 318:8fb8458177fc
Regression: fix "Missing Information" strings shown in about dialog
Reviewed-by: rkennke
Review-thread: http://icedtea.classpath.org/pipermail/thermostat/2012-May/001424.html
author | Omair Majid <omajid@redhat.com> |
---|---|
date | Fri, 18 May 2012 18:59:57 -0400 |
parents | 48ea5b366b4d |
children | 0a1b2769bd8a |
files | client/core/pom.xml client/core/src/main/java/com/redhat/thermostat/client/ApplicationInfo.java client/core/src/main/resources/com/redhat/thermostat/client/app-info.properties common/pom.xml common/src/main/resources/com/redhat/thermostat/app-info.properties |
diffstat | 5 files changed, 17 insertions(+), 18 deletions(-) [+] |
line wrap: on
line diff
--- a/client/core/pom.xml Fri May 18 14:41:22 2012 -0400 +++ b/client/core/pom.xml Fri May 18 18:59:57 2012 -0400 @@ -107,6 +107,14 @@ </dependencies> <build> + + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> + <plugins> <plugin> <groupId>org.apache.felix</groupId>
--- a/client/core/src/main/java/com/redhat/thermostat/client/ApplicationInfo.java Fri May 18 14:41:22 2012 -0400 +++ b/client/core/src/main/java/com/redhat/thermostat/client/ApplicationInfo.java Fri May 18 18:59:57 2012 -0400 @@ -55,14 +55,12 @@ private static final Logger logger = LoggingUtils.getLogger(ApplicationInfo.class); - private static final String APP_INFO_ROOT = "com/redhat/thermostat/"; - private Properties appInfo; public ApplicationInfo() { appInfo = new Properties(); - ClassLoader cl = this.getClass().getClassLoader(); - InputStream res = cl.getResourceAsStream(APP_INFO_ROOT + "app-info.properties"); + // the properties file should be in the same package as this class + InputStream res = getClass().getResourceAsStream("app-info.properties"); if (res != null) { try { appInfo.load(res);
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/client/core/src/main/resources/com/redhat/thermostat/client/app-info.properties Fri May 18 18:59:57 2012 -0400 @@ -0,0 +1,7 @@ +APP_NAME = Thermostat +APP_VERSION = ${project.version} +APP_RELEASE_DATE = ${thermostat.releasedate} +APP_EMAIL = ${thermostat.email} +APP_WEBSITE = ${project.url} +APP_COPYRIGHT = Copyright 2012 Red Hat, Inc. +
--- a/common/pom.xml Fri May 18 14:41:22 2012 -0400 +++ b/common/pom.xml Fri May 18 18:59:57 2012 -0400 @@ -52,13 +52,6 @@ <url>${project.parent.url}</url> <build> - <resources> - <resource> - <directory>src/main/resources</directory> - <filtering>true</filtering> - </resource> - </resources> - <plugins> <plugin> <groupId>org.apache.felix</groupId>
--- a/common/src/main/resources/com/redhat/thermostat/app-info.properties Fri May 18 14:41:22 2012 -0400 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -APP_NAME = Thermostat -APP_VERSION = ${project.version} -APP_RELEASE_DATE = ${thermostat.releasedate} -APP_EMAIL = ${thermostat.email} -APP_WEBSITE = ${project.url} -APP_COPYRIGHT = Copyright 2012 Red Hat, Inc. -