[jboss-jira] [JBoss JIRA] (WFLY-13692) Anything in jboss-all.xml after <weld/> element is ignored
L K (Jira)
issues at jboss.org
Thu Jul 23 15:29:37 EDT 2020
[ https://issues.redhat.com/browse/WFLY-13692?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14288092#comment-14288092 ]
L K edited comment on WFLY-13692 at 7/23/20 3:29 PM:
-----------------------------------------------------
Well, as somebody that uses jboss-all.xml I really do not care about javadoc...
But as somebody who wasted some time on this I can tell you that you need to parse the element *completely*. Somebody might put something like this in jboss-all.xml:
<jboss xmlns="urn:jboss:1.0">
<weld xmlns="urn:jboss:weld:1.1>
<some-stupid-element/>
</weld>
</jboss>
Yes, it is incorrect, but this is what WeldJBossAllXYParser must deal with.
Just look at for example JBossDeploymentStructureParserXY: it parses everything until it hits END_ELEMENT.
was (Author: l-k-test):
Well, as somebody that uses jboss-all.xml I really do not care about javadoc...
But as somebody who wasted some time on this I can tell you that you need to parse the element *completely*. Somebody might put something like this in jboss-all.xml:
<jboss xmlns="urn:jboss:1.0">
<weld xmlns="urn:jboss:weld:1.1>
<some-stupid-element/>
</weld>
</jboss>
Yes, it is incorrect, but this is what WeldJBossAllXYParser must deal with.
Just look at for example JBossDeploymentStructureParserXY: it parses everything until it hits END_ELEMENT.
> Anything in jboss-all.xml after <weld/> element is ignored
> ----------------------------------------------------------
>
> Key: WFLY-13692
> URL: https://issues.redhat.com/browse/WFLY-13692
> Project: WildFly
> Issue Type: Bug
> Components: CDI / Weld
> Affects Versions: 20.0.1.Final
> Reporter: L K
> Assignee: Matěj Novotný
> Priority: Major
>
> Classes org.jboss.as.weld.WeldJBossAll10Parser and org.jboss.as.weld.WeldJBossAll11Parser are incorrect. They do not parse <weld> element as XML, they just check attributes.
> As a result, everything that comes after </weld> is ignored.
> This jboss-all.xml fails, as expected:
> {code:java}
> <jboss xmlns="urn:jboss:1.0">
> <some-stupid-element/>
> <weld xmlns="urn:jboss:weld:1.1"/>
> </jboss>
> {code}
> This one is successfully parsed (but must also fail):
> {code:java}
> <jboss xmlns="urn:jboss:1.0">
> <weld xmlns="urn:jboss:weld:1.1"/>
> <some-stupid-element/>
> </jboss>
> {code}
>
> Now imagine that "some-stupid-element" is in fact "jboss-deployment-structure" which gets ignored...
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list