lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gsing...@apache.org
Subject svn commit: r911534 - /lucene/solr/trunk/src/java/org/apache/solr/search/function/distance/DistanceUtils.java
Date Thu, 18 Feb 2010 19:26:31 GMT
Author: gsingers
Date: Thu Feb 18 19:26:31 2010
New Revision: 911534

URL: http://svn.apache.org/viewvc?rev=911534&view=rev
Log:
SOLR-1779: how about a proper fix this time, as last fix didn't account for spaces

Modified:
    lucene/solr/trunk/src/java/org/apache/solr/search/function/distance/DistanceUtils.java

Modified: lucene/solr/trunk/src/java/org/apache/solr/search/function/distance/DistanceUtils.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/search/function/distance/DistanceUtils.java?rev=911534&r1=911533&r2=911534&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/search/function/distance/DistanceUtils.java
(original)
+++ lucene/solr/trunk/src/java/org/apache/solr/search/function/distance/DistanceUtils.java
Thu Feb 18 19:26:31 2010
@@ -140,8 +140,9 @@
         while (start < end && externalVal.charAt(start) == ' ') start++;
         while (end > start && externalVal.charAt(end - 1) == ' ') end--;
         out[i] = externalVal.substring(start, end);
-        start = end + 1;
+        start = idx + 1;
         end = externalVal.indexOf(',', start);
+	idx = end;
         if (end == -1) {
           end = externalVal.length();
         }
@@ -180,8 +181,9 @@
         while (start < end && externalVal.charAt(start) == ' ') start++;
         while (end > start && externalVal.charAt(end - 1) == ' ') end--;
         out[i] = Double.parseDouble(externalVal.substring(start, end));
-        start = end + 1;
+        start = idx + 1;
         end = externalVal.indexOf(',', start);
+	idex = end;
         if (end == -1) {
           end = externalVal.length();
         }



Mime
View raw message