[YANGTOOLS-180] STRING_DEFAULT_CODEC - deserialize can return null Created: 04/Jun/14  Updated: 10/Apr/22  Resolved: 10/Jun/14

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

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

Operating System: Windows
Platform: PC


External issue ID: 1130

 Description   

TypeDefinitionAwareCodec contains class StringCodecStringImpl where deserialize method is implemented like this:

public String deserialize(String stringRepresentation)

{ return stringRepresentation; }

It cause NullPointerException when trying parse from composite node to normalized node (if there is node with null value).

Could it be like this?

public String deserialize(String stringRepresentation)

{ return stringRepresentation == null ? "" : stringRepresentation; }

 Comments   
Comment by Jozef Gloncak [ 04/Jun/14 ]

https://git.opendaylight.org/gerrit/#/c/7664/2

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