Uploaded image for project: 'yangtools'
  1. yangtools
  2. YANGTOOLS-1439

Improve Decimal64.toString() implementation

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Done
    • Icon: Medium Medium
    • 9.0.1
    • None
    • common

      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.

            ivanhrasko Ivan Hrasko
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: