[windup-dev] XmlFile unexpected results?
Matej Briskar
mbriskar at redhat.com
Thu Jan 28 11:21:17 EST 2016
A topic from today's meeting, however I thought it will be better understood in text.
XmlFile may cause confusion, because it may return different results based on what it is queried for and therefore throw exceptions in some cases.
1. XmlFile querying for xpath will always return part of the file with the line number etc.
2. XmlFile not querying for xpath but other things (used DTD query or something similar), returns the whole file.
The problem here is that using second XmlFile-style without xpath throws exception when used with Hints. Therefore the second condition supports only classifications.
Is this expected behaviour? That is the my only question.
E.g
This works:
<when>
<xmlfile matches="*xpath*" />
<perfom>
<hint>
...
</hint>
</perform>
This does not and throws exception (cannot cast to FileLocationModel):
<when>
<xmlfile public-id="*xpath*" />
<perfom>
<hint>
...
</hint>
</perform>
If that is not a problem, it is OK. Just wanted to point it out.
More information about the windup-dev
mailing list