[MDSAL-146] Incorrect use of format strings in generated code when backing type is an array (binding spec v2) Created: 05/Apr/16  Updated: 09/Mar/18  Resolved: 10/Mar/17

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

Type: Improvement
Reporter: Martin Ciglan Assignee: Jakub Toth
Resolution: Cannot Reproduce Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: Linux
Platform: PC


Issue Links:
Blocks
blocks MDSAL-55 Topic: Continuos: Decrease technical ... Resolved
blocks YANGTOOLS-361 Milestone: Decrease Technical Debt fr... Resolved
is blocked by MDSAL-40 Milestone: Implement Binding Specific... Resolved

 Description   

+++ This bug was initially created as a clone of MDSAL-29 +++

Yangtools will currently generate code like:

throw new IllegalArgumentException(String.format("Invalid length: {}, expected: {}.", value, lengthConstraints));

This is incorrect since {} is a slf4j-style format specifier when you want a format string.



 Comments   
Comment by Martin Ciglan [ 10/Jan/17 ]

fix seems to be merged for Binding spec v1, but it's not complete - array is still issue. Check this out in v2

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