Another source code change that impacted my team when we upgraded from 0.9.3.9 to 0.9.5.3 was the signature of the unmarshal method changed from the type'd return to java.lang.Object. Now I suppose it could be argued that this is the proper signature, and I will certainly agree with that, but, wouldn't it be nice to have a property that controlled that behavior?

Let's say org.exolab.castor.builder.unMarshalAsObject with a default of true, then the SourceFactory.java file could look like:

        JMethod jMethod = null;
        if (_config.unmarshalAsObject()) {
            jMethod = new JMethod(SGTypes.Object ,methodName);^M
        } else {
            jMethod = new JMethod(parent ,methodName);^M
        }      

 

Seems reasonable doesn't it? Looking at the generated code anyway shows that the unmarshal code types the return anyway.

 

Cheers

Eric

<<attachment: Blank Bkgrd.gif>>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to