[Libreoffice-commits] core.git: nlpsolver/ThirdParty
rbuj
robert.buj at gmail.com
Thu Aug 7 05:46:42 PDT 2014
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit efbc5ac6cc4f8d7b57e4d24a70bae92fa0d22060
Author: rbuj <robert.buj at gmail.com>
Date: Thu Aug 7 14:19:04 2014 +0200
nlpsolver: Number parsing
Change-Id: I37a83b8e8c0f084ae175be5a5c58fc6b852e23a1
Reviewed-on: https://gerrit.libreoffice.org/10807
Reviewed-by: David Tardon <dtardon at redhat.com>
Tested-by: David Tardon <dtardon at redhat.com>
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java
index 0a17c11..8d3436a 100644
--- a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java
+++ b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java
@@ -128,12 +128,12 @@ public class GlobalString {
static public int toInteger(Object oVal) throws Exception {
if(oVal==null) throw new Exception("Null string");
- return new Integer(oVal.toString()).intValue();
+ return Integer.parseInt(oVal.toString());
}
static public double toDouble(Object oVal) throws Exception {
if(oVal==null) throw new Exception("Null string");
- return new Double(oVal.toString()).doubleValue();
+ return Double.parseDouble(oVal.toString());
}
public static Object toObject(String key) throws Exception{
More information about the Libreoffice-commits
mailing list