Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeneviève Bastien2018-05-30 10:24:01 -0400
committerGenevieve Bastien2018-06-06 13:56:13 -0400
commit2fc83b4bbd209169572c1405df82c288e88f1c63 (patch)
tree6a89a78c3937bc4e4a6e210bb0ea2b603a26aacc
parentd22b5cf11f828270f4d1f9f86cc56607d5e4bd94 (diff)
downloadorg.eclipse.tracecompass.incubator-2fc83b4bbd209169572c1405df82c288e88f1c63.tar.gz
org.eclipse.tracecompass.incubator-2fc83b4bbd209169572c1405df82c288e88f1c63.tar.xz
org.eclipse.tracecompass.incubator-2fc83b4bbd209169572c1405df82c288e88f1c63.zip
callstack: Do not throw NPE when xml analysis does not exist
If the analysis referred to by the XML callstack did not exist, the help would throw an NPE, which causes the trace not to open at all. Now it just displays a warning, but does not throw exception. Change-Id: I6d246d0b58ddb7a8998d02fa88786d23a6568325 Signed-off-by: Geneviève Bastien <gbastien+lttng@versatic.net> Reviewed-on: https://git.eclipse.org/r/123650 Tested-by: CI Bot Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
-rw-r--r--callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/xml/callstack/CallstackXmlModuleHelper.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/xml/callstack/CallstackXmlModuleHelper.java b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/xml/callstack/CallstackXmlModuleHelper.java
index a8e08497..d0da4941 100644
--- a/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/xml/callstack/CallstackXmlModuleHelper.java
+++ b/callstack/org.eclipse.tracecompass.incubator.callstack.core/src/org/eclipse/tracecompass/incubator/internal/callstack/core/xml/callstack/CallstackXmlModuleHelper.java
@@ -81,7 +81,7 @@ public class CallstackXmlModuleHelper extends TmfAnalysisModuleHelperXml {
Multimap<String, IAnalysisModuleHelper> analysisModules = TmfAnalysisManager.getAnalysisModules();
Collection<IAnalysisModuleHelper> collection = analysisModules.get(fAnalysisId);
if (collection.isEmpty()) {
- throw new NullPointerException("Callstack XML analysis: no analysis called " + fAnalysisId); //$NON-NLS-1$
+ Activator.getInstance().logWarning("Callstack XML analysis: no analysis called " + fAnalysisId); //$NON-NLS-1$
}
return collection;
}

Back to the top