Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-4267

A NPE in AttatchmentDataSource could be guarded.

    XMLWordPrintableJSON

Details

    Description

      If I do a release a hold on a DataSource like this:

      void release(DataSource ds) throws IOException {
      AttachmentDataSource ads = getAttachmentDataSource(ds);
      if (ads != null)

      { // tell attachment to hold the temporary file; ads.release(); }

      }

      and the ads.isCached() is false, I get a NPE. I know that without a hold() there should be no release(), but sometimes it may happen anyway (e.g. in finally blocks), and then it would not be necesarry to check isCahced() before.

      Attachments

        Activity

          People

            dkulp Daniel Kulp
            fugu Stefan E. Funk
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: