[ 
https://issues.apache.org/jira/browse/SOLR-1779?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yonik Seeley resolved SOLR-1779.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5

this was already committed, closing.

> DistanceUtils.parsePoint doesn't handle dimensions > 2 properly
> ---------------------------------------------------------------
>
>                 Key: SOLR-1779
>                 URL: https://issues.apache.org/jira/browse/SOLR-1779
>             Project: Solr
>          Issue Type: Bug
>            Reporter: Grant Ingersoll
>            Priority: Trivial
>             Fix For: 1.5
>
>
> As the title says.  Here's the fix:
> {code}
> Index: DistanceUtils.java
> ===================================================================
> --- DistanceUtils.java  (revision 911529)
> +++ DistanceUtils.java  (working copy)
> @@ -140,7 +140,7 @@
>          while (start < end && externalVal.charAt(start) == ' ') start++;
>          while (end > start && externalVal.charAt(end - 1) == ' ') end--;
>          out[i] = externalVal.substring(start, end);
> -        start = idx + 1;
> +        start = end + 1;
>          end = externalVal.indexOf(',', start);
>          if (end == -1) {
>            end = externalVal.length();
> @@ -180,7 +180,7 @@
>          while (start < end && externalVal.charAt(start) == ' ') start++;
>          while (end > start && externalVal.charAt(end - 1) == ' ') end--;
>          out[i] = Double.parseDouble(externalVal.substring(start, end));
> -        start = idx + 1;
> +        start = end + 1;
>          end = externalVal.indexOf(',', start);
>          if (end == -1) {
>            end = externalVal.length();
> {code}
> Will commit now, but am going to check in a test as part of SOLR-1568, which 
> I have open w/ lots of other changes.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to