From: Alexandre Montplaisir Date: Sat, 9 Apr 2016 22:27:11 +0000 (-0400) Subject: tmf: Fix opening symbol config dialog for experiments X-Git-Url: http://git.efficios.com/?a=commitdiff_plain;h=b587a6c37ee96889e85386e9b6d940c57d39b9e4;p=deliverable%2Ftracecompass.git tmf: Fix opening symbol config dialog for experiments An ArrayIndexOutOfBounds exception could be thrown when opening the symbol mapping configuration dialog in the context of a multi-trace experiment. Index "-1" would be passed to updateMessage(int). When the window is first opened, the selection index is at -1, simply skip the updateMessage() in this case. Change-Id: I43b384016ec7dfff1b16b272b34155579bc101cc Signed-off-by: Alexandre Montplaisir Reviewed-on: https://git.eclipse.org/r/70314 Reviewed-by: Hudson CI Reviewed-by: Robert Kiss --- diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/symbols/SymbolProviderConfigDialog.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/symbols/SymbolProviderConfigDialog.java index f85f4ef5bc..898e1598e1 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/symbols/SymbolProviderConfigDialog.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/symbols/SymbolProviderConfigDialog.java @@ -172,8 +172,11 @@ public class SymbolProviderConfigDialog extends TitleAreaDialog implements IPref public void updateMessage() { if (fTabFolder == null) { updateMessage(0); - } else { - updateMessage(fTabFolder.getSelectionIndex()); + return; + } + int curSelectionIndex = fTabFolder.getSelectionIndex(); + if (curSelectionIndex >= 0) { + updateMessage(curSelectionIndex); } }