[YANGTOOLS-1439] Improve Decimal64.toString() implementation Created: 25/May/22  Updated: 29/Jul/22  Resolved: 29/Jul/22

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

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Ivan Hrasko
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The implementation of Decimal64.toString() construct involves quite a bit of computation, padding and what not. At the end of the day, all we really need to do is:

  • print the unscaled value in a StringBuilder
  • insert a period at the correct place
  • trim excess trailing zeroes
  • convert that to a String

Update the implementation to perform the above.


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