-
Notifications
You must be signed in to change notification settings - Fork 76
Open
Description
Thank you so much for making this tool!
When testing it, I ran into this case that causes a stack overflow:
String pattern = "^[a-zA-Z\s]*$";
Generex generex = new Generex(pattern);
String firstMatch = generex.getFirstMatch();
And when that code is run I get this exception:
Exception in thread "main" java.lang.StackOverflowError
at java.base/java.util.HashMap$HashIterator.<init>(HashMap.java:1475)
at java.base/java.util.HashMap$KeyIterator.<init>(HashMap.java:1514)
at java.base/java.util.HashMap$KeySet.iterator(HashMap.java:912)
at java.base/java.util.HashSet.iterator(HashSet.java:173)
at java.base/java.util.AbstractCollection.toArray(AbstractCollection.java:184)
at dk.brics.automaton.State.getSortedTransitionArray(Unknown Source)
at dk.brics.automaton.State.getSortedTransitions(Unknown Source)
at com.mifmif.common.regex.Generex.prepareTransactionNodes(Generex.java:265)
Could this be fixed?
Metadata
Metadata
Assignees
Labels
No labels