Unneeded cast in java.text.DigitList.append

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 26
    • Component/s: core-libs
    • generic
    • generic

      DecimalFormat uses DigitList.append for parsing routines.

      During the append process:

      An int from range 0 to 9 is converted to a char of '0' to '9'. This char is then converted to a byte (the code points 48 - 57).

      Explicitly it is int -> char -> byte.

      This could be simplified (explicitly) to int -> byte w/o the need for the intermediate cast to char.

            Assignee:
            Justin Lu
            Reporter:
            Justin Lu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: