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

URLDataSource should call setDoOutput(true) before returning OutputStream

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.0.2
    • Component/s: other-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      1.0.2
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Description



      Name: bsT130419 Date: 09/20/2001


      java version "1.4.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
      Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)

      For javax.activation.URLDataSource

      getContentType reuses the internal URLConnection reference (of name "url_conn")
      and that's nice. Strangely getInputStream and getOutputStream don't.

      An aside:
      In addition, I would like to bring your attention to another URLDataSource
      deficiency that seems to have fallen to the wayside that is also easy to fix
      and has been reported already:
      http://developer.java.sun.com/developer/bugParade/bugs/4120784.html

      In short, the problem is that the OutputStream doesn't work for some types of
      URLs and that all that needs to be done is to add:
      url_conn.setDoOutput(true);
        before the line
      return url_conn.getOutputStream();
        (with the squiggly braces, and the url_conn re-using fix too, of course)
      (Review ID: 132310)
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            bshannon Bill Shannon (Inactive)
            Reporter:
            bstrathesunw Bill Strathearn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: