HttpCookie constructor should throw IllegalArgumentException when NAME is a blank string

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 6
    • Affects Version/s: 6
    • Component/s: core-libs
    • None
    • beta
    • sparc
    • solaris_10
    • Verified

      When NAME is a blank string, HttpCookie constructor should throw IllegalArgmentException, instead of StringIndexOutOfBoundsException.
      java.lang.StringIndexOutOfBoundsException: String index out of range: 0
              at java.lang.String.charAt(String.java:570)
              at java.net.HttpCookie.isReserved(HttpCookie.java:843)
              at java.net.HttpCookie.<init>(HttpCookie.java:123)
              at TestHttpCookie3.main(TestHttpCookie3.java:38)


      ###@###.### 2005-05-30 07:18:20 GMT

            Assignee:
            Yujiang Wang (Inactive)
            Reporter:
            Judy Gao (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: