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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Classlib
    • 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

        1. charset_patch.txt
          8 kB
          Richard Liang

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: