summaryrefslogtreecommitdiff
path: root/nlpsolver
diff options
context:
space:
mode:
authorrbuj <robert.buj@gmail.com>2014-08-07 14:19:04 +0200
committerDavid Tardon <dtardon@redhat.com>2014-08-07 12:46:22 +0000
commitefbc5ac6cc4f8d7b57e4d24a70bae92fa0d22060 (patch)
tree9e0c33604087c08f5530f5fb216f718fb4683ab3 /nlpsolver
parent529bb272e296c7f41416d9392787bc2cdf5fe362 (diff)
nlpsolver: Number parsing
Change-Id: I37a83b8e8c0f084ae175be5a5c58fc6b852e23a1 Reviewed-on: https://gerrit.libreoffice.org/10807 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'nlpsolver')
-rw-r--r--nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java b/nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java
index 0a17c115f087..8d3436a7f1b7 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{