[Schmitzm-commits] r1016 - in branches/2.2.x: src/skrueger/versionnumber src_junit/skrueger/versionnumber
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Mon Sep 20 18:35:22 CEST 2010
Author: alfonx
Date: 2010-09-20 18:35:21 +0200 (Mon, 20 Sep 2010)
New Revision: 1016
Modified:
branches/2.2.x/src/skrueger/versionnumber/ReleaseUtil.java
branches/2.2.x/src_junit/skrueger/versionnumber/ReleaseUtilTest.java
Log:
Backported to schmitzm that Geopublisher now uses the date as the release number
Modified: branches/2.2.x/src/skrueger/versionnumber/ReleaseUtil.java
===================================================================
--- branches/2.2.x/src/skrueger/versionnumber/ReleaseUtil.java 2010-09-20 16:11:51 UTC (rev 1015)
+++ branches/2.2.x/src/skrueger/versionnumber/ReleaseUtil.java 2010-09-20 16:35:21 UTC (rev 1016)
@@ -95,7 +95,7 @@
*
* @Return the major part of the software version or 0 if a problem occurs.
*/
- public static int getVersionBuild(Class<?> clazz) {
+ public static double getVersionBuild(Class<?> clazz) {
try {
final URL releasePropsURL = clazz
.getResource("/release.properties");
@@ -115,7 +115,7 @@
return 0;
}
- return Integer.parseInt(str);
+ return Double.parseDouble(str);
} catch (final Exception e) {
log.error("/release.properties could not be read from "
+ clazz.getSimpleName(), e);
Modified: branches/2.2.x/src_junit/skrueger/versionnumber/ReleaseUtilTest.java
===================================================================
--- branches/2.2.x/src_junit/skrueger/versionnumber/ReleaseUtilTest.java 2010-09-20 16:11:51 UTC (rev 1015)
+++ branches/2.2.x/src_junit/skrueger/versionnumber/ReleaseUtilTest.java 2010-09-20 16:35:21 UTC (rev 1016)
@@ -13,5 +13,7 @@
assertEquals(0,ReleaseUtil.extractMinVersionFromString("0.0"));
assertEquals(5,ReleaseUtil.extractMinVersionFromString("1.5-SNAPSHOT"));
assertEquals(5,ReleaseUtil.extractMinVersionFromString("1.5r234"));
+
+ assertEquals(5,ReleaseUtil.extractMinVersionFromString("1.5r201009221756"),0.01);
}
}
More information about the Schmitzm-commits
mailing list