Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-469

NullPointerException when including a submodule of a more recent revision than the module

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Resolution: Done
    • None
    • None
    • None
    • None
    • Operating System: All
      Platform: All

    • 3799

    Description

      Attached are two yang files, a simple module which includes a submodule. When parsing them a NullPointerException occurs:

      java.lang.NullPointerException
      at org.opendaylight.yangtools.yang.parser.builder.impl.GroupingUtils.getTargetGroupingFromModules(GroupingUtils.java:59)
      at org.opendaylight.yangtools.yang.parser.impl.YangParserImpl.resolveUsesTargetGrouping(YangParserImpl.java:1083)
      at org.opendaylight.yangtools.yang.parser.impl.YangParserImpl.build(YangParserImpl.java:707)
      at org.opendaylight.yangtools.yang.parser.impl.YangParserImpl.parseYangModelSources(YangParserImpl.java:354)
      at org.opendaylight.yangtools.yang.parser.impl.YangParserImpl.parseSources(YangParserImpl.java:195)

      It only happens when the submodule has a more recent revision date than the module. The include statement in the model specifies no revision date.

      When debugging I can see that
      org.opendaylight.yangtools.yang.parser.builder.impl.BuilderUtils.findModule(QName, Map<URI, TreeMap<Date, ModuleBuilder>>) is unable to find the correct module.

      The Yangtools version is 0.6.5-Helium-SR3.

      Attachments

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

        Activity

          People

            pkajsa Peter Kajsa
            claudia.hwang@ontology.com Claudia Hwang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: