You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Freeman Fang (JIRA)" <ji...@apache.org> on 2007/04/03 05:50:32 UTC

[jira] Commented: (CXF-496) holder parameter couldn't be null

    [ https://issues.apache.org/jira/browse/CXF-496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12486216 ] 

Freeman Fang commented on CXF-496:
----------------------------------

according to java spec, argument only passed by value, so if a holder parameter is null, it would be always null even we create it in the method, so even for out holder, we really need to create it before pass into method, null holder make nonsence here. I will close this issue since it's mission impossible.
    the code shows java argument is passed by value
    @Test
    public void testNull() {
        Holder<String> str = null;
        
        putString(str);
        assertNotNull(str);// will get AssertError
    }

    private void putString(Holder<String> str) {
        str = new Holder<String>();
        str.value = "ffang";
        
    }



> holder parameter couldn't be null
> ---------------------------------
>
>                 Key: CXF-496
>                 URL: https://issues.apache.org/jira/browse/CXF-496
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Freeman Fang
>         Assigned To: Freeman Fang
>
> if an operation have holder paramenter, and the holder is null, then runtime will throw exception. should support null holder in runtime

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.