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

A few methods of class URLConnection implemented incorrectly

XMLWordPrintable

    • b71
    • generic
    • generic

      Methods addRequestProperty(String,String), setRequestProperty(String,String),
      getRequestProperty(String) not perform as specified in the documentation.
      If the methods have no implementation they should be declared as abstract.
      Probably, other methods also aren't implemented.

      See attached example.
      ###@###.### 2005-2-18 10:03:14 GMT
      more precisely: set/add/getRequestProperty wrongly processes empty key string.
      It seems getRequestProperty( '' ) always return null.

      A small problem: the API doesn't provide method to reset property value.
      In addition, the documentation doesn't specify what setRequestProperty(<key>, <key default value>) does.
      There are two possibilities: reset this property, or treat default value as any other value. The difference is in execution of next addRequestProperty method.

            chegar Chris Hegarty
            rmakarch Roman Makarchuk (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: