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 2022/03/18 14:28:05 UTC

[GitHub] [lucene] ywelsch commented on pull request #752: LUCENE-10474: Avoid throwing StackOverflowError when creating RegExp

ywelsch commented on pull request #752:
URL: https://github.com/apache/lucene/pull/752#issuecomment-1072464227


   > As a library, we should throw the correct exception type, we shouldn't change it for fun. It is not correct to assume that this can only happen as result of union either.
   
   I'm not sure what you're saying:
   
   - This is not changing it for fun. There is a proper explanation here you chose to ignore. Further, as outlined in the corresponding Lucene issue (https://issues.apache.org/jira/browse/LUCENE-10474) this patch follows the [approach taken by the JDK](https://github.com/openjdk/jdk/blob/cab4ff64541393a974ea91e35167668ef0036804/src/java.base/share/classes/java/util/regex/Pattern.java#L1441) to provide sensible exception behavior to users.
   - The patch does not assume it is only happening as result of union (the try / catch is in the RegExp constructor, not in the code that parses unions).


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org

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