From efbc5ac6cc4f8d7b57e4d24a70bae92fa0d22060 Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 7 Aug 2014 14:19:04 +0200 Subject: nlpsolver: Number parsing Change-Id: I37a83b8e8c0f084ae175be5a5c58fc6b852e23a1 Reviewed-on: https://gerrit.libreoffice.org/10807 Reviewed-by: David Tardon Tested-by: David Tardon --- .../EvolutionarySolver/src/net/adaptivebox/global/GlobalString.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nlpsolver') 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{ -- cgit