byte to char a narrowing conversion?

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 5.0
    • Affects Version/s: 1.4.0
    • Component/s: specification
    • None
    • tiger
    • generic
    • solaris_8
    • Verified

      JLS 5.1.3 defines the byte to char conversion as a narrowing
      conversion that simply discards bits. That doesn't work because the
      conversion adds bits, not removes bits. Is the sign extended before
      discarding bits or is the value padded with zeroes? This is
      completely unspecified in the JLS and implementations could differ.

            Assignee:
            Gilad Bracha (Inactive)
            Reporter:
            Neal Gafter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: