Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-113

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: 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)

      { // }

      }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: