diff options
author | Alexandre Montplaisir | 2015-02-13 19:35:10 +0000 |
---|---|---|
committer | Alexandre Montplaisir | 2015-03-09 18:49:30 +0000 |
commit | 1d83ed07f51fbfce0a582acbd6e08b0926a67ce5 (patch) | |
tree | aa5ba3bee723c3607bad0faab6ad2b494c14093f /org.eclipse.tracecompass.tmf.ui | |
parent | 21852dfa0810717b45a411cb1b671281a3956f8d (diff) | |
download | org.eclipse.tracecompass-1d83ed07f51fbfce0a582acbd6e08b0926a67ce5.tar.gz org.eclipse.tracecompass-1d83ed07f51fbfce0a582acbd6e08b0926a67ce5.tar.xz org.eclipse.tracecompass-1d83ed07f51fbfce0a582acbd6e08b0926a67ce5.zip |
tmf: Mark TmfTraceUtils @NonNullByDefault
Change-Id: I5121586872f26e8ed3f3f790611a91d51b3f9b28
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/41856
Reviewed-by: Hudson CI
Diffstat (limited to 'org.eclipse.tracecompass.tmf.ui')
2 files changed, 12 insertions, 5 deletions
diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/TmfStatisticsViewer.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/TmfStatisticsViewer.java index f65d06595b..78185496b9 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/TmfStatisticsViewer.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/viewers/statistics/TmfStatisticsViewer.java @@ -15,6 +15,8 @@ package org.eclipse.tracecompass.tmf.ui.viewers.statistics; +import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull; + import java.util.Collection; import java.util.HashMap; import java.util.List; @@ -632,7 +634,8 @@ public class TmfStatisticsViewer extends TmfViewer { fTimeRangePartial = timeRange; } - for (final ITmfTrace aTrace : TmfTraceManager.getTraceSet(trace)) { + for (ITmfTrace aTrace : TmfTraceManager.getTraceSet(trace)) { + aTrace = checkNotNull(aTrace); if (!isListeningTo(aTrace)) { continue; } diff --git a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java index 293bd03a64..8f9f9c079a 100644 --- a/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java +++ b/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java @@ -14,6 +14,8 @@ package org.eclipse.tracecompass.tmf.ui.views.callstack; +import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull; + import java.io.File; import java.util.ArrayList; import java.util.Collections; @@ -29,6 +31,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.Job; +import org.eclipse.jdt.annotation.NonNull; import org.eclipse.jdt.annotation.Nullable; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.IAction; @@ -455,11 +458,11 @@ public class CallStackView extends TmfView { } private class BuildThread extends Thread { - private final ITmfTrace fBuildTrace; + private final @NonNull ITmfTrace fBuildTrace; private final ITmfTrace fParentTrace; private final IProgressMonitor fMonitor; - public BuildThread(ITmfTrace trace, ITmfTrace parentTrace) { + public BuildThread(@NonNull ITmfTrace trace, ITmfTrace parentTrace) { super("CallStackView build"); //$NON-NLS-1$ fBuildTrace = trace; fParentTrace = parentTrace; @@ -833,6 +836,7 @@ public class CallStackView extends TmfView { refresh(); synchronized (fBuildThreadMap) { for (ITmfTrace trace : TmfTraceManager.getTraceSet(fTrace)) { + trace = checkNotNull(trace); BuildThread buildThread = new BuildThread(trace, fTrace); fBuildThreadMap.put(trace, buildThread); buildThread.start(); @@ -846,7 +850,7 @@ public class CallStackView extends TmfView { } } - private void buildThreadList(final ITmfTrace trace, final ITmfTrace parentTrace, IProgressMonitor monitor) { + private void buildThreadList(final @NonNull ITmfTrace trace, final ITmfTrace parentTrace, IProgressMonitor monitor) { if (monitor.isCanceled()) { return; } @@ -1314,7 +1318,7 @@ public class CallStackView extends TmfView { return fPrevEventAction; } - private static @Nullable AbstractCallStackAnalysis getCallStackModule(ITmfTrace trace) { + private static @Nullable AbstractCallStackAnalysis getCallStackModule(@NonNull ITmfTrace trace) { /* * Since we cannot know the exact analysis ID (in separate plugins), we * will search using the analysis type. |