cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-496) holder parameter couldn't be null
Date Tue, 03 Apr 2007 03:50:32 GMT

    [ 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.


Mime
View raw message