[Schmitzm-commits] r1018 - branches/2.2.x/src/skrueger/versionnumber

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Mon Sep 20 19:40:52 CEST 2010


Author: alfonx
Date: 2010-09-20 19:40:51 +0200 (Mon, 20 Sep 2010)
New Revision: 1018

Modified:
   branches/2.2.x/src/skrueger/versionnumber/ReleaseUtil.java
Log:
Some more tuning with the release number.. it's now a string 

Modified: branches/2.2.x/src/skrueger/versionnumber/ReleaseUtil.java
===================================================================
--- branches/2.2.x/src/skrueger/versionnumber/ReleaseUtil.java	2010-09-20 16:38:10 UTC (rev 1017)
+++ branches/2.2.x/src/skrueger/versionnumber/ReleaseUtil.java	2010-09-20 17:40:51 UTC (rev 1018)
@@ -95,7 +95,7 @@
 	 * 
 	 * @Return the major part of the software version or 0 if a problem occurs.
 	 */
-	public static double getVersionBuild(Class<?> clazz) {
+	public static String getVersionBuild(Class<?> clazz) {
 		try {
 			final URL releasePropsURL = clazz
 					.getResource("/release.properties");
@@ -112,14 +112,14 @@
 			if (str.equals("${buildNumber}")) {
 				// We are in development or Maven didn't filter the properties
 				// while building.
-				return 0;
+				return "0";
 			}
 
-			return Double.parseDouble(str);
+			return str;
 		} catch (final Exception e) {
 			log.error("/release.properties could not be read from "
 					+ clazz.getSimpleName(), e);
-			return 0;
+			return "0";
 		}
 
 	}



More information about the Schmitzm-commits mailing list