Console output ASCII value instead of the character

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.2.0
    • Affects Version/s: 1.0.1
    • Component/s: deploy
    • None
    • 1.2
    • generic
    • generic
    • Verified

        In Console.java, we did not convert the ASCII value to the string correctly:

        in the write(int b) method, we do:

        insert(Byte.toString((byte)b));

        this would not convert int(ASCII value) into the repsective string, e.g int 60 should represent the string "<", the above conversion will only convert int 60 to a string "60".

        It should be

        insert(String.valueOf((char)b));

        instead. It will return the string "<" if int b = 60.

        the attached test.java will demonstrate the problem and the fix clearly.

              Assignee:
              Thomas Ng (Inactive)
              Reporter:
              Thomas Ng (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: