-
Bug
-
Resolution: Done
-
Medium
-
Magnesium SR1, Aluminium
When schema contains yang model that defines particular regexp, apidoc explorer is not able to list resource definition and throw java.lang.StackOverflowError
It was tracked down that this happen when we have list of containers with string leaf restricted by following regexp:
typedef module-name { reference "RFC 6020: YANG - A Data Modelling Language Section 5.2. File Layout"; type string { pattern '[a-zA-Z_][a-zA-Z0-9\-_.]*(@\d{4}-\d{2}-\d{2})?'; } }
Here is excerpt from stacktrace (shortened to relevant part)
Caused by: java.lang.StackOverflowError at java.util.HashMap$HashIterator.<init>(HashMap.java:1475) ~[?:?] at java.util.HashMap$KeyIterator.<init>(HashMap.java:1514) ~[?:?] at java.util.HashMap$KeySet.iterator(HashMap.java:912) ~[?:?] at java.util.HashSet.iterator(HashSet.java:173) ~[?:?] at java.util.AbstractCollection.toArray(AbstractCollection.java:184) ~[?:?] at dk.brics.automaton.State.getSortedTransitionArray(State.java:136) ~[?:?] at dk.brics.automaton.State.getSortedTransitions(State.java:147) ~[?:?] at com.mifmif.common.regex.Generex.prepareRandom(Generex.java:340) ~[?:?] at com.mifmif.common.regex.Generex.prepareRandom(Generex.java:366) ~[?:?] at com.mifmif.common.regex.Generex.prepareRandom(Generex.java:366) ~[?:?] at com.mifmif.common.regex.Generex.prepareRandom(Generex.java:366) ~[?:?] at com.mifmif.common.regex.Generex.prepareRandom(Generex.java:366) ~[?:?]