Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6277808

HttpCookie constructor should throw IllegalArgumentException when NAME is a blank string

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 6
    • 6
    • 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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: