Uploaded image for project: 'Cocoon 3 (Retired)'
  1. Cocoon 3 (Retired)
  2. COCOON3-46

URLConnectionUtils.closeQuietly() complains loudly if servletConnection == null

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.0-alpha-2
    • 3.0.0-alpha-3
    • cocoon-pipeline
    • None

    Description

      finally clause in URLResponse method execute()
      contains call to URLConnectionUtils.closeQuietly.

      If servletConnection = this.url.openConnection(); fails, servletConnection is null.

      In that case closeQuietly causes a stacktrace to be output.

      Solution is if (servletConnection != null) URLConnectionUtils.closeQuietly(servletConnection);, guard the call with a test,
      or even better, take into account in closeQuietly that the input parameter may be null.

      Attachments

        1. closeQuietly-fix.patch
          0.7 kB
          Jos Snellings

        Activity

          People

            steven.dolg Steven Dolg
            jos.snellings@upperware.biz Jos Snellings
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: