tmf : Fix the xml condition multiple problem
authorJean-Christian Kouame <jean-christian.kouame@ericsson.com>
Thu, 10 Dec 2015 20:34:16 +0000 (15:34 -0500)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Mon, 14 Dec 2015 20:25:04 +0000 (15:25 -0500)
commit1010de5ea78a4055eb043045e74ea46d0fad0967
tree7e29dcacadddd2f96ffe3ae2150ffa94860d4f9c
parentf278fbd44a2bdcbd7239293e862472bb3715e331
tmf : Fix the xml condition multiple problem

This patch initiates the number of state values involved in a comparison
only when the xml element is <condition>. Without this fix, conditions
like OR or AND with more than two operands fail because we were
validating that the maximum number of state values was actually two.
Since the XSD validates that already the condition is removed in this
patch and the allocation of the state value list is done only when the
element is <condition>. In other cases, the list is instantiated to an
empty list.
This patch also add a test with a condition with three operands in
TmfXmlConditionTest to validate this case.

Change-Id: I6e99f770b35f3359a5617bc01b8a53bc77df637e
Signed-off-by: Jean-Christian Kouame <jean-christian.kouame@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/62425
Reviewed-by: Hudson CI
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.analysis.xml.core.tests/src/org/eclipse/tracecompass/tmf/analysis/xml/core/tests/stateprovider/TmfXmlConditionTest.java
tmf/org.eclipse.tracecompass.tmf.analysis.xml.core.tests/test_xml_files/test_valid/test_conditions.xml
tmf/org.eclipse.tracecompass.tmf.analysis.xml.core/src/org/eclipse/tracecompass/tmf/analysis/xml/core/model/TmfXmlCondition.java
This page took 0.025249 seconds and 5 git commands to generate.