[
https://issues.apache.org/jira/browse/CXFXJC-4?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kulp resolved CXFXJC-4.
------------------------------
Resolution: Fixed
Fix Version/s: 3.0.0
Assignee: Daniel Kulp
I took a slightly different approach. Instead of removing this entirely,
I've made it optional so a -Xdv:optional can keep the existing behavior. For
projects like CXF's configuration where we "read" the config, but never write
it, having those objects there may be important and would break things if they
aren't.
> Enabling XJC DV plugin creates invalid content
> ----------------------------------------------
>
> Key: CXFXJC-4
> URL: https://issues.apache.org/jira/browse/CXFXJC-4
> Project: CXF XJC Utils
> Issue Type: Bug
> Reporter: Dan Retzlaff
> Assignee: Daniel Kulp
> Priority: Minor
> Fix For: 3.0.0
>
> Attachments: fail-dv-test.patch, fix-dv-test.patch, fix-dv.patch
>
>
> CXF-1206 introduces a behavior where complex types containing elements with
> default values get automatically instantiated in a parent. For example, given
> A(complex) contains B(complex) contains C(simple with default)
> A's constructor initializes "B b = new B()". This behavior goes beyond
> applying a default value; nothing in the schema says that A's "b" should be
> present by default.
> In our case, the presence of B has semantic value. What's more, B contains
> additional required fields, so this "default" invalidates the content model.
--
This message was sent by Atlassian JIRA
(v6.2#6252)