You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Gus Heck (Jira)" <ji...@apache.org> on 2019/10/22 02:32:00 UTC

[jira] [Commented] (SOLR-13857) QueryParser.jj produces code that will not compile

    [ https://issues.apache.org/jira/browse/SOLR-13857?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16956619#comment-16956619 ] 

Gus Heck commented on SOLR-13857:
---------------------------------

There also seem to be a variety of edits, some of which are trivial IDE warning type things (generics, pointless casts, etc) that should probably be allowed to revert to generated form, but I see the following 3 edits that appear to be optimizations, that probably need to be retained, which begs the question of how we avoid loosing them if anyone ever updates the parser sufficiently that they want to regen the code.
 # org/apache/solr/parser/ParseException.java:176 - concatenation inside an append in a loop
 # org/apache/solr/parser/QueryParserTokenManager.java:1405 StringBuilder instead of StringBuffer
 # org/apache/solr/parser/TokenMgrError.java:85 - concatenation inside an append in a loop

> QueryParser.jj produces code that will not compile
> --------------------------------------------------
>
>                 Key: SOLR-13857
>                 URL: https://issues.apache.org/jira/browse/SOLR-13857
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: query parsers
>            Reporter: Gus Heck
>            Assignee: Gus Heck
>            Priority: Major
>
> There are 2 problems that have crept into the parser generation system.
>  # SOLR-8764 removed deprecated methods that are part of a generated interface (and the implementation thereof). It's kind of stinky that Javacc is generating an interface that includes deprecated methods, but deleting them from the generated class means that re-generation causes compiler errors, so this should probably be reverted.
>  # SOLR-11662 changed the signature of org.apache.solr.parser.QueryParser#newFieldQuery to add a parameter, but did not update the corresponding portion of the QueryParser.jj file, and so the method signature reverts upon regeneration, causing compile errors.
>  # There are a few places where string concatenation was turned to .append()
> The pull request to be attached soon fixes these two issues such that running ant javacc-QueryParser will once again produce code that compiles.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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