You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andrea Smyth (JIRA)" <ji...@apache.org> on 2006/10/10 13:02:21 UTC

[jira] Resolved: (CXF-141) Fix configurable bean code generators to distiguish default value from injected value

     [ http://issues.apache.org/jira/browse/CXF-141?page=all ]

Andrea Smyth resolved CXF-141.
------------------------------

    Resolution: Fixed

Also completely decoupled default value handling from generating code for configurable beans.
Both plugins to reuse original code where possible (e.g. default value plugin  for all attributes of type != xs:duration) and retain signatures of getters (unboxed if default value present, boxed if no default value present) however little sense tat makes (its part of the JAXB specification!).


> Fix configurable bean code generators to distiguish default value from injected value
> -------------------------------------------------------------------------------------
>
>                 Key: CXF-141
>                 URL: http://issues.apache.org/jira/browse/CXF-141
>             Project: CeltiXfire
>          Issue Type: Bug
>          Components: Configuration
>    Affects Versions: 2.0-M1
>            Reporter: Andrea Smyth
>         Assigned To: Andrea Smyth
>             Fix For: 2.0-M1
>
>
> The current approach does not allow proper use of fallback providers if the property has a default because we cannot distinguish between the cases when a default is used and when a value was injected.
> E.g. instead of:
> public BigDecimal getDecimalElem() {
>         BigDecimal _decimalElem = tryOverwrite(BigDecimal.class, "decimalElem");
>         if (!(null == _decimalElem)) {
>             return _decimalElem;
>         }
>         if (null == decimalElem) {
>             return tryFallback(BigDecimal.class, "decimalElem");
>         } else {
>             return decimalElem;
>         }
>     }
> generate this:
> public BigDecimal getDecimalElem() {
>         BigDecimal _decimalElem = tryOverwrite(BigDecimal.class, "decimalElem");
>         if (!(null == _decimalElem)) {
>             return _decimalElem;
>         }
>         if (null != decimalElem) {
>             return decimalElem;
>         }
>         _decimalElem =  tryFallback(BigDecimal.class, "decimalElem");;
>         if (null != _decimalElem) {
>             return _decimalElem;
>         } 
>         return new BigDecimal("15");       
>     }
> and leave the data members uninitialised!
> Once fixed, revisit the use of overwrite providers in the http and jms transports (replace by  fallback providers).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira