Hello,
I'm running Solr 5.1 and during indexing I get an
ArrayIndexOutOfBoundsException at line 61 of
org/apache/solr/util/RecordingJSONParser.java. Looking at the code (see
below), it seems obvious that the if-statement at line 60 should use a
greater-than sign instead of greater-than-or-equals.

  @Override
  public CharArr getStringChars() throws IOException {
    CharArr chars = super.getStringChars();
    recordStr(chars.toString());
    position = getPosition();
    // if reading a String , the getStringChars do not return the closing
single quote or double quote
    //so, try to capture that
    if(chars.getArray().length >=chars.getStart()+chars.size()) {     //
line 60
      char next = chars.getArray()[chars.getStart() + chars.size()]; //
line 61
      if(next =='"' || next == '\'') {
        recordChar(next);
      }
    }
    return chars;
  }

Should I create a JIRA ticket? (Am I allowed to?)  I can provide more info
about my particular usage including a stacktrace if that's helpful. I'm
using the new custom JSON indexing, which, by the way, is an excellent
feature and will be of great benefit to my project. Thanks for that.

Regards,
Scott Dawson

Reply via email to