[
https://issues.apache.org/jira/browse/CXF-141?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrea Smyth closed CXF-141.
----------------------------
> Fix configurable bean code generators to distiguish default value from
> injected value
> -------------------------------------------------------------------------------------
>
> Key: CXF-141
> URL: https://issues.apache.org/jira/browse/CXF-141
> Project: CXF
> 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:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira