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

        Kevin Zhou created issue -
        Hide
        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
        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 } }
        Hide
        Kevin Zhou added a comment -

        Would you please help to try it?

        Show
        Kevin Zhou added a comment - Would you please help to try it?
        Kevin Zhou made changes -
        Field Original Value New Value
        Attachment HARMONY-6142.diff [ 12405032 ]
        Tim Ellison made changes -
        Assignee Tim Ellison [ tellison ]
        Hide
        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
        Tim Ellison added a comment - Thanks Kevin. Patch applied to LUNI module at repo revision r768935. Please check it was applied as you expected.
        Tim Ellison made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]
        Hide
        Kevin Zhou added a comment -

        Thanks, Tim.

        Show
        Kevin Zhou added a comment - Thanks, Tim.
        Kevin Zhou made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        18d 9h 9m 1 Tim Ellison 27/Apr/09 12:42
        Resolved Resolved Closed Closed
        21h 44m 1 Kevin Zhou 28/Apr/09 10:26

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development