Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6184334

Massive duplication of code in contains(Charset) methods in UTF-* Charsets

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 6
    • core-libs
    • None
    • Cause Known
    • generic
    • generic

      All of the Unicode-encoding Charsets such as UTF-8 and UTF-16
      have a boolean contains(Charset) method that enumerates all
      the other charsets.

      This is obviously a maintenance problem. This method should,
      at the very least, be refactored. The enumerated list of
      other charsets is likely to be incorrect. It would be correct
      to return true for any Charset that we currently implement, and
      it is hard to imagine a Charset for which it would not be true
      that, say, UTF-16 contains it. Perhaps we should simply return true.
      ###@###.### 10/26/04 02:26 GMT

            Unassigned Unassigned
            martin Martin Buchholz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: