mirror of https://github.com/apache/lucene.git
SOLR-1779: how about a proper fix this time, as last fix didn't account for spaces
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@911534 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
06e20d9795
commit
7bb906f020
|
@ -140,8 +140,9 @@ public class DistanceUtils {
|
|||
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 @@ public class DistanceUtils {
|
|||
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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue