Harmony
  1. Harmony
  2. HARMONY-113

java.nio.charset.Charset should regard empty charset name properly as Illegal CharsetName

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Classlib
    • Labels:
      None

      Description

      I think it's caused by the different between RI 1.4.2 and RI 5.0. Three test cases in JIRA#57 should be updated accordingly.

      public void testIsSupported_EmptyString() {
      try

      { Charset.isSupported(""); fail("Should throw IllegalCharsetNameException!"); }

      catch (IllegalCharsetNameException e)

      { // }
      }

      public void testConstructor_EmptyCanonicalName() {
      try { new MockCharset("", new String[0]); fail("Should throw IllegalCharsetNameException!"); } catch (IllegalCharsetNameException e) { // }

      }

      public void testConstructor_EmptyAliases() {
      try {
      new MockCharset("mockChar", new String[]

      { "" }

      );
      fail("Should throw IllegalCharsetNameException!");
      } catch (IllegalCharsetNameException e)

      { // }

      }

      1. charset_patch.txt
        8 kB
        Richard Liang

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            Tim Ellison
            Reporter:
            Richard Liang
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development