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

[classlib][luni] java.util.StringTokenizer.nextToken(String delim) should throw NullPointerException when the given delim is null

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0M8
    • Fix Version/s: 5.0M9
    • Component/s: Classlib
    • Labels:
      None
    • Estimated Complexity:
      Moderate

      Description

      The java spec says that the nextToken(String delim) method should throw NullPointerException when the given delim is null.
      It seems that HY doesn't have this feature implemented here.

        Activity

        Hide
        zhoukevin Kevin Zhou added a comment -

        Thanks, Tim.

        Show
        zhoukevin Kevin Zhou added a comment - Thanks, Tim.
        Hide
        tellison Tim Ellison added a comment -

        Thanks Kevin.

        Patch applied to LUNI module at repo revision r768935.

        Please check it was applied as you expected.

        Show
        tellison Tim Ellison added a comment - Thanks Kevin. Patch applied to LUNI module at repo revision r768935. Please check it was applied as you expected.
        Hide
        zhoukevin Kevin Zhou added a comment -

        Would you please help to try it?

        Show
        zhoukevin Kevin Zhou added a comment - Would you please help to try it?
        Hide
        zhoukevin Kevin Zhou added a comment -

        Given a test case [1], RI passes while HY fails on it.

        [1] Test Case:
        public void test_nextTokenLjava_lang_String() {
        StringTokenizer stringTokenizer = new StringTokenizer(new String());
        try

        { stringTokenizer.nextToken(null); fail("should throw NullPointerException"); }

        catch (NullPointerException e)

        { // Expected }

        }

        Show
        zhoukevin Kevin Zhou added a comment - Given a test case [1] , RI passes while HY fails on it. [1] Test Case: public void test_nextTokenLjava_lang_String() { StringTokenizer stringTokenizer = new StringTokenizer(new String()); try { stringTokenizer.nextToken(null); fail("should throw NullPointerException"); } catch (NullPointerException e) { // Expected } }

          People

          • Assignee:
            tellison Tim Ellison
            Reporter:
            zhoukevin Kevin Zhou
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development