Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-713

Stackoverflow in sal-rest-docgen

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Done
    • Magnesium SR1, Aluminium
    • 3.0.0, 2.0.15
    • restconf-nb

    Description

      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) ~[?:?]
      

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            SamoSchneider Samuel Schneider
            rkosegi Richard Kosegi
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: