msokolov commented on a change in pull request #2071: URL: https://github.com/apache/lucene-solr/pull/2071#discussion_r520253512
########## File path: lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextVectorReader.java ########## @@ -245,8 +245,8 @@ private void readAllVectors() throws IOException { private void readVector(float[] value) throws IOException { SimpleTextUtil.readLine(in, scratch); - // skip leading " [" and strip trailing "]" - String s = new BytesRef(scratch.bytes(), 2, scratch.length() - 3).utf8ToString(); + // skip leading "[" and strip trailing "]" + String s = new BytesRef(scratch.bytes(), 1, scratch.length() - 2).utf8ToString(); Review comment: Wow, how did this ever work; we must never have tested it. grr. Thank you for cleaning up! ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org