[MDSAL-255] IllegalArgumentException thrown since parentTypeForBuilder was not set to some kind of schema nodes Created: 23/May/17  Updated: 09/Mar/18  Resolved: 01/Mar/18

Status: Verified
Project: mdsal
Component/s: Binding V2 codegen
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Jie Han Assignee: Jie Han
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


External issue ID: 8530

 Description   

IllegalArgumentException thrown since parentTypeForBuilder was not set to some kinds of schema nodes,such as notification,augmentation in uses.

java.lang.IllegalArgumentException: Type parameter MUST be specified and cannot be NULL!

at com.google.common.base.Preconditions.checkArgument(Preconditions.java:122)
at org.opendaylight.mdsal.binding.javav2.java.api.generator.renderers.BaseRenderer.putTypeIntoImports(BaseRenderer.java:150)
at org.opendaylight.mdsal.binding.javav2.java.api.generator.renderers.BaseRenderer.importedName(BaseRenderer.java:72)
at org.opendaylight.mdsal.binding.javav2.java.api.generator.renderers.BuilderRenderer.body(BuilderRenderer.java:256)
at org.opendaylight.mdsal.binding.javav2.java.api.generator.renderers.BaseRenderer.generateTemplate(BaseRenderer.java:363)
at org.opendaylight.mdsal.binding.javav2.java.api.generator.BuilderGenerator.generate(BuilderGenerator.java:39)
at org.opendaylight.mdsal.binding.javav2.java.api.generator.GeneratorJavaFile.generateTypeToJavaFile(GeneratorJavaFile.java:192)
at org.opendaylight.mdsal.binding.javav2.java.api.generator.GeneratorJavaFile.generateToFile(GeneratorJavaFile.java:106)
at org.opendaylight.mdsal.binding.javav2.java.api.generator.GeneratorJavaFileTest.myGeneratedFilesTest(GeneratorJavaFileTest.java:39)

The



 Comments   
Comment by Jie Han [ 23/May/17 ]

a new patch has committed:
https://git.opendaylight.org/gerrit/#/c/57615/

Comment by Jie Han [ 23/May/17 ]

Hi, Martin,
I have one question, which parentTypeBuilder should be set to notification type? As for list type ,the parentTypeBuilder would be set to

{moudle}

Data type, but is it the same way to notifications ?

Comment by Martin Ciglan [ 23/May/17 ]

in general as name of this field says, it needs to be set for data types when builder template is used to generate *Builder classes.

Comment by Jie Han [ 23/May/17 ]

(In reply to Martin Ciglan from comment #3)
> in general as name of this field says, it needs to be set for data types
> when builder template is used to generate *Builder classes.

As before if there are no data nodes like leaf,list , but only notification ,then the

{module}

Data type would not be generated, should we create it without any getter ?
How to use "Item<> treeIdentifier()" ?

Comment by Jie Han [ 24/May/17 ]

The patch https://git.opendaylight.org/gerrit/#/c/57615/ has been abondoned,

Here is a new relative patch:
MDSAL-255 IllegalArgumentException thrown since parentTypeForBuilder was not set
https://git.opendaylight.org/gerrit/#/c/57748/

Comment by Jie Han [ 20/Oct/17 ]

https://git.opendaylight.org/gerrit/#/c/58012

Generated at Wed Feb 07 20:09:14 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.