You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Stefan E. Funk (JIRA)" <ji...@apache.org> on 2012/04/26 10:56:12 UTC

[jira] [Created] (CXF-4267) A NPE in AttatchmentDataSource could be guarded.

Stefan E. Funk created CXF-4267:
-----------------------------------

             Summary: A NPE in AttatchmentDataSource could be guarded.
                 Key: CXF-4267
                 URL: https://issues.apache.org/jira/browse/CXF-4267
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime
    Affects Versions: 2.5.2
            Reporter: Stefan E. Funk
            Priority: Trivial


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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (CXF-4267) A NPE in AttatchmentDataSource could be guarded.

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp resolved CXF-4267.
------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3.11
                   2.4.8
                   2.5.4
                   2.6.1
    
> A NPE in AttatchmentDataSource could be guarded.
> ------------------------------------------------
>
>                 Key: CXF-4267
>                 URL: https://issues.apache.org/jira/browse/CXF-4267
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>            Reporter: Stefan E. Funk
>            Assignee: Daniel Kulp
>            Priority: Trivial
>             Fix For: 2.6.1, 2.5.4, 2.4.8, 2.3.11
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CXF-4267) A NPE in AttatchmentDataSource could be guarded.

Posted by "Stefan E. Funk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CXF-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13262745#comment-13262745 ] 

Stefan E. Funk commented on CXF-4267:
-------------------------------------

Boy, are you guys fast! Glad we switched from Axis2 to CXF :-)
                
> A NPE in AttatchmentDataSource could be guarded.
> ------------------------------------------------
>
>                 Key: CXF-4267
>                 URL: https://issues.apache.org/jira/browse/CXF-4267
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>            Reporter: Stefan E. Funk
>            Assignee: Daniel Kulp
>            Priority: Trivial
>             Fix For: 2.6.1, 2.5.4, 2.4.8, 2.3.11
>
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Assigned] (CXF-4267) A NPE in AttatchmentDataSource could be guarded.

Posted by "Daniel Kulp (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CXF-4267?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Daniel Kulp reassigned CXF-4267:
--------------------------------

    Assignee: Daniel Kulp
    
> A NPE in AttatchmentDataSource could be guarded.
> ------------------------------------------------
>
>                 Key: CXF-4267
>                 URL: https://issues.apache.org/jira/browse/CXF-4267
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 2.5.2
>            Reporter: Stefan E. Funk
>            Assignee: Daniel Kulp
>            Priority: Trivial
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira