[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 |
||
| 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 ] |