tmf: fix regression in trace type detection
authorBernd Hufmann <Bernd.Hufmann@ericsson.com>
Thu, 25 Feb 2016 16:04:32 +0000 (11:04 -0500)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Thu, 25 Feb 2016 17:29:04 +0000 (12:29 -0500)
Patch 281def4 moved the trace type detection to tmf.core. With this
change the traces that validate with confidence 0 for more than one
trace type will have a trace type set that is first in the list.
Before previous patch the trace type was not set if the confidence
was 0.

Change-Id: I2fb3dbd933ae673ce54569356f190c19a7d72d49
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/67346
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Hudson CI
tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/project/model/TmfTraceType.java

index e9acc8ff6034b879d85f65ea217ba977f1a2dbc1..e15a92b5561c7e2e0acba933f80b462c09dc8c91 100644 (file)
@@ -655,7 +655,10 @@ public final class TmfTraceType {
                     }
                 } else {
                     for (Pair<Integer, TraceTypeHelper> candidatePair : reducedCandidates) {
-                        returned.add(candidatePair.getSecond());
+                        // Don't select the trace type if it has the lowest confidence
+                        if (candidatePair.getFirst() > 0) {
+                            returned.add(candidatePair.getSecond());
+                        }
                     }
                 }
             }
This page took 0.027781 seconds and 5 git commands to generate.