From: <jes...@us...> - 2011-01-13 15:28:39
|
Revision: 7151 http://geonetwork.svn.sourceforge.net/geonetwork/?rev=7151&view=rev Author: jesseeichar Date: 2011-01-13 15:28:33 +0000 (Thu, 13 Jan 2011) Log Message: ----------- 138556: fix for BBox replacement error Modified Paths: -------------- sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/Utils.java Modified: sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/Utils.java =================================================================== --- sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/Utils.java 2011-01-13 15:27:20 UTC (rev 7150) +++ sandbox/geocat.ch/trunk/src/org/fao/geonet/services/reusable/Utils.java 2011-01-13 15:28:33 UTC (rev 7151) @@ -267,13 +267,16 @@ } } - private static boolean equalIds(String value, String id) { + private static boolean equalIds(String value, String id2) { // ids are normally ints bug some (like keywords) are strings + String id1 = Utils.id(value); try { - return parseDouble(Utils.id(value)) - parseDouble(id) < 0.1; + double id1Double = parseDouble(id1); + double id2Double = parseDouble(id2); + return Math.abs(id1Double - id2Double) < 0.1; } catch (NumberFormatException e) { - return Utils.id(value).equals(id); + return id1.equals(id2); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |