Author: gbrown
Date: Wed May 25 18:00:11 2011
New Revision: 1127600
URL: http://svn.apache.org/viewvc?rev=1127600&view=rev
Log:
Apply patch for PIVOT-746.
Modified:
pivot/trunk/build.xml
pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java
Modified: pivot/trunk/build.xml
URL:
http://svn.apache.org/viewvc/pivot/trunk/build.xml?rev=1127600&r1=1127599&r2=1127600&view=diff
==============================================================================
--- pivot/trunk/build.xml (original)
+++ pivot/trunk/build.xml Wed May 25 18:00:11 2011
@@ -221,9 +221,6 @@ limitations under the License.
<exclude name="**/*.java"/>
<exclude name="**/package.html"/>
</fileset>
- <fileset dir=".">
- <include name="build.properties"/>
- </fileset>
</jar>
</sequential>
</macrodef>
Modified: pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java
URL:
http://svn.apache.org/viewvc/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java?rev=1127600&r1=1127599&r2=1127600&view=diff
==============================================================================
--- pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java (original)
+++ pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java Wed May 25
18:00:11 2011
@@ -49,7 +49,6 @@ import java.net.URI;
import java.net.URISyntaxException;
import java.net.URL;
import java.util.Iterator;
-import java.util.Properties;
import java.util.Random;
import java.util.Timer;
import java.util.TimerTask;
@@ -1516,18 +1515,11 @@ public abstract class ApplicationContext
jvmVersion = Version.decode(System.getProperty("java.vm.version"));
// Get the Pivot version
- InputStream buildPropertiesInputStream =
ApplicationContext.class.getClassLoader().getResourceAsStream("build.properties");
-
- if (buildPropertiesInputStream == null) {
+ String version =
ApplicationContext.class.getPackage().getImplementationVersion();
+ if (version == null) {
pivotVersion = new Version(0, 0, 0, 0);
} else {
- try {
- Properties buildProperties = new Properties();
- buildProperties.load(buildPropertiesInputStream);
- pivotVersion =
Version.decode(buildProperties.getProperty("version"));
- } catch (IOException exception) {
- throw new RuntimeException(exception);
- }
+ pivotVersion = Version.decode(version);
}
}