Uploaded image for project: 'mdsal'
  1. mdsal
  2. MDSAL-51

Binding Java API Generator -> NPE during code generation from specific yang models (package name is null for UnionType)

    XMLWordPrintable

Details

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

    • 2323

    Description

      [ERROR] yang-to-sources: Unable to generate sources with org.opendaylight.yangtools.maven.sal.api.gen.plugin.CodeGeneratorImpl generator
      java.lang.IllegalArgumentException: Type cannot have Package Name referenced as NULL!
      at com.google.common.base.Preconditions.checkArgument(Preconditions.java:88)
      at org.opendaylight.yangtools.sal.java.api.generator.GeneratorUtil.putTypeIntoImports(GeneratorUtil.java:138)

      package name cannot be null, problem with hard-coded UnionType class:

      public static final class UnionType implements Type {
      @Override
      public String getPackageName() {
      return null;
      .
      .
      .
      .
      .

      Attachments

        Issue Links

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

          Activity

            People

              martin.ciglan Martin Ciglan
              martin.ciglan Martin Ciglan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: