You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/09/17 17:21:04 UTC

[GitHub] [lucene-solr] dsmiley commented on a change in pull request #1877: SOLR-13181: param macro expansion could throw

dsmiley commented on a change in pull request #1877:
URL: https://github.com/apache/lucene-solr/pull/1877#discussion_r490430100



##########
File path: solr/core/src/java/org/apache/solr/request/macro/MacroExpander.java
##########
@@ -188,7 +189,7 @@ else if (failOnMissingParams) {
 
       } catch (SyntaxError syntaxError) {
         // append the part we would have skipped
-        sb.append( val.substring(matchedStart, start) );
+        sb.append(val, matchedStart, start);

Review comment:
       IntelliJ pointed this out to me :-)  It didn't know about the val.substring(start) (implied val.length()) so I did those manually.  Yes, it'd be nice if everywhere we could do this in one go.  Feel free to file an issue to do so if you have time.  IntelliJ can make quick work of that.




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org