tmf: Null-annotate state system API classes
[deliverable/tracecompass.git] / org.eclipse.tracecompass.tmf.core / src / org / eclipse / tracecompass / tmf / core / callstack / CallStackStateProvider.java
index c0ff03c8d27081ac7ec25d73f8a9942f8d0a7bc5..9307b111185fd4695a0a0de5dbb6ab49e595eb1f 100644 (file)
 
 package org.eclipse.tracecompass.tmf.core.callstack;
 
+import static org.eclipse.tracecompass.common.core.NonNullUtils.checkNotNull;
+
+import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.tracecompass.internal.tmf.core.Activator;
+import org.eclipse.tracecompass.statesystem.core.ITmfStateSystemBuilder;
 import org.eclipse.tracecompass.statesystem.core.exceptions.AttributeNotFoundException;
 import org.eclipse.tracecompass.statesystem.core.exceptions.StateValueTypeException;
 import org.eclipse.tracecompass.statesystem.core.exceptions.TimeRangeException;
@@ -73,7 +77,7 @@ public abstract class CallStackStateProvider extends AbstractTmfStateProvider {
     public static final String UNDEFINED = "UNDEFINED"; //$NON-NLS-1$
 
     /** CallStack state system ID */
-    private static final String ID = "org.eclipse.linuxtools.tmf.callstack"; //$NON-NLS-1$
+    private static final @NonNull String ID = "org.eclipse.linuxtools.tmf.callstack"; //$NON-NLS-1$
     /** Dummy function name for when no function is expected */
     private static final String NO_FUNCTION = "no function"; //$NON-NLS-1$
 
@@ -83,7 +87,7 @@ public abstract class CallStackStateProvider extends AbstractTmfStateProvider {
      * @param trace
      *            The trace for which we build this state system
      */
-    public CallStackStateProvider(ITmfTrace trace) {
+    public CallStackStateProvider(@NonNull ITmfTrace trace) {
         super(trace, ITmfEvent.class, ID);
     }
 
@@ -92,6 +96,9 @@ public abstract class CallStackStateProvider extends AbstractTmfStateProvider {
         if (!considerEvent(event)) {
             return;
         }
+
+        ITmfStateSystemBuilder ss = checkNotNull(getStateSystemBuilder());
+
         try {
             /* Check if the event is a function entry */
             String functionEntryName = functionEntry(event);
This page took 0.023966 seconds and 5 git commands to generate.