Shad Storhaug created LUCENE-8001:
-------------------------------------

             Summary: UnescapedCharSequence Bugs
                 Key: LUCENE-8001
                 URL: https://issues.apache.org/jira/browse/LUCENE-8001
             Project: Lucene - Core
          Issue Type: Bug
          Components: core/queryparser
    Affects Versions: 7.1
            Reporter: Shad Storhaug
            Priority: Minor


There are a couple of issues with UnescapedCharSequence:

1. The [private 
constructor|https://github.com/apache/lucene-solr/blob/32ed8520c706a865b94e03644ae4e4435e0f7d35/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/UnescapedCharSequence.java#L52-L63]
 is not used anywhere (and if it were, it would throw exceptions)
2. The ToEscapedString() overload has an [invalid 
condition|https://github.com/apache/lucene-solr/blob/32ed8520c706a865b94e03644ae4e4435e0f7d35/lucene/queryparser/src/java/org/apache/lucene/queryparser/flexible/core/util/UnescapedCharSequence.java#L96]
 that will only evaluate to true if the string has a length of 0.

There are no tests for UnescapedCharSequence so these issues have gone 
unnoticed for quite some time.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to