Annotate parameters of Immutable collections copyOf() of()
authorMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Mon, 16 Nov 2015 23:22:46 +0000 (18:22 -0500)
committerMarc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tue, 17 Nov 2015 21:43:37 +0000 (16:43 -0500)
Those methods will throw NPEs if null is passed.
Also fix a few warnings that were introduced by these new annotations.

Change-Id: I73efaa5507b1dfcf9da41c86dc93bbd8ea8b3c27
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/60568
Reviewed-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Tested-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
12 files changed:
btf/org.eclipse.tracecompass.btf.core/src/org/eclipse/tracecompass/btf/core/event/BtfEventType.java
btf/org.eclipse.tracecompass.btf.core/src/org/eclipse/tracecompass/btf/core/trace/BtfTrace.java
common/org.eclipse.tracecompass.common.core/annotations/com/google/common/collect/ImmutableList.eea
common/org.eclipse.tracecompass.common.core/annotations/com/google/common/collect/ImmutableMap.eea
common/org.eclipse.tracecompass.common.core/annotations/com/google/common/collect/ImmutableSet.eea
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/Activator.java
lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/package-info.java [new file with mode: 0644]
lttng/org.eclipse.tracecompass.lttng2.ust.ui.swtbot.tests/src/org/eclipse/tracecompass/lttng2/ust/ui/swtbot/tests/CallStackViewTest.java
statesystem/org.eclipse.tracecompass.segmentstore.core.tests/src/org/eclipse/tracecompass/segmentstore/core/tests/treemap/TreeMapStoreTest.java
tmf/org.eclipse.tracecompass.tmf.core.tests/stubs/org/eclipse/tracecompass/tmf/tests/stubs/analysis/AnalysisRequirementFactory.java
tmf/org.eclipse.tracecompass.tmf.core/src/org/eclipse/tracecompass/tmf/core/event/TmfEventField.java
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/internal/tmf/ui/editors/ITmfEventsEditorConstants.java

index 09b552c475d897ba4f636d655ea8913b259be99d..835c280ff30f670129dfe05e1e29b108142a4973 100644 (file)
@@ -16,6 +16,7 @@ package org.eclipse.tracecompass.btf.core.event;
 import java.util.Collection;
 import java.util.List;
 
+import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.tracecompass.btf.core.Messages;
 import org.eclipse.tracecompass.btf.core.trace.BtfColumnNames;
 import org.eclipse.tracecompass.tmf.core.event.ITmfEventField;
@@ -31,18 +32,18 @@ import com.google.common.collect.ImmutableList;
  */
 public class BtfEventType extends TmfEventType {
 
-    private static final String[] FIELD_WITH_NOTES_COLUMNS = new String[] {
+    private static final String @NonNull [] FIELD_WITH_NOTES_COLUMNS = new String[] {
             BtfColumnNames.EVENT.toString(),
             BtfColumnNames.SOURCE_INSTANCE.toString(),
             BtfColumnNames.TARGET_INSTANCE.toString() };
 
-    private static final String[] FIELDS_WITHOUT_NOTES_COLUMNS = new String[] {
+    private static final String @NonNull [] FIELDS_WITHOUT_NOTES_COLUMNS = new String[] {
             BtfColumnNames.EVENT.toString(),
             BtfColumnNames.SOURCE_INSTANCE.toString(),
             BtfColumnNames.TARGET_INSTANCE.toString(),
             BtfColumnNames.NOTES.toString() };
-    private static final ITmfEventField FIELDS_WITHOUT_NOTES = TmfEventField.makeRoot(FIELD_WITH_NOTES_COLUMNS);
-    private static final ITmfEventField FIELDS_WITH_NOTES = TmfEventField.makeRoot(FIELDS_WITHOUT_NOTES_COLUMNS);
+    private static final @NonNull ITmfEventField FIELDS_WITHOUT_NOTES = TmfEventField.makeRoot(FIELD_WITH_NOTES_COLUMNS);
+    private static final @NonNull ITmfEventField FIELDS_WITH_NOTES = TmfEventField.makeRoot(FIELDS_WITHOUT_NOTES_COLUMNS);
     private final String fName;
     private final String fDescription;
     private final boolean fHasNotes;
index ef796b9320429e4ea240fa142595bdd3eba6387f..fd6d55f51464cad6346d54a4086578eef180ea00 100644 (file)
@@ -29,6 +29,7 @@ import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.tracecompass.btf.core.Activator;
 import org.eclipse.tracecompass.btf.core.event.BtfEvent;
 import org.eclipse.tracecompass.btf.core.event.BtfEventType;
@@ -93,11 +94,11 @@ public class BtfTrace extends TmfTrace implements ITmfPersistentlyIndexable, ITm
 
     private static int fCheckpointSize = -1;
 
-    private final Map<String, String> fProperties = new HashMap<>();
+    private final @NonNull Map<String, String> fProperties = new HashMap<>();
 
-    private final Map<Integer, String> fEntityTable = new TreeMap<>();
-    private final Map<BtfEventType, String> fEntityTypeTable = new HashMap<>();
-    private final Map<Integer, BtfEventType> fEntityTypes = new TreeMap<>();
+    private final @NonNull Map<Integer, String> fEntityTable = new TreeMap<>();
+    private final @NonNull Map<BtfEventType, String> fEntityTypeTable = new HashMap<>();
+    private final @NonNull Map<Integer, BtfEventType> fEntityTypes = new TreeMap<>();
 
     private String fVersion;
     private String fCreator;
index c66072110ec3038c7e2ed558926e1352e708e457..a2aeeec74ecbd0a68b81a67ccf6503942c2c9c84 100644 (file)
@@ -7,52 +7,52 @@ builder
  <E:Ljava/lang/Object;>()L1com/google/common/collect/ImmutableList$Builder<TE;>;
 copyOf
  <E:Ljava/lang/Object;>(Ljava/lang/Iterable<+TE;>;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(Ljava/lang/Iterable<+TE;>;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(L1java/lang/Iterable<+TE;>;)L1com/google/common/collect/ImmutableList<TE;>;
 copyOf
  <E:Ljava/lang/Object;>(Ljava/util/Collection<+TE;>;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(Ljava/util/Collection<+TE;>;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(L1java/util/Collection<+TE;>;)L1com/google/common/collect/ImmutableList<TE;>;
 copyOf
  <E:Ljava/lang/Object;>(Ljava/util/Iterator<+TE;>;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(Ljava/util/Iterator<+TE;>;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(L1java/util/Iterator<+TE;>;)L1com/google/common/collect/ImmutableList<TE;>;
 copyOf
  <E:Ljava/lang/Object;>([TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>([TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>([1TE;)L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>()Lcom/google/common/collect/ImmutableList<TE;>;
  <E:Ljava/lang/Object;>()L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(T1E;)L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;)L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;)L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;T1E;)L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;T1E;T1E;)L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;T1E;T1E;T1E;)L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;T1E;T1E;T1E;T1E;)L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;TE;TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;TE;TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;)L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;TE;TE;TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;TE;TE;TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;)L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;TE;TE;TE;TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;TE;TE;TE;TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;)L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;TE;TE;TE;TE;TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;TE;TE;TE;TE;TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;)L1com/google/common/collect/ImmutableList<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;TE;TE;TE;TE;TE;TE;[TE;)Lcom/google/common/collect/ImmutableList<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;TE;TE;TE;TE;TE;TE;[TE;)L1com/google/common/collect/ImmutableList<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;T1E;[TE;)L1com/google/common/collect/ImmutableList<TE;>;
index 6eabf292ab2883c26e5d8c0dede1ec6089e6074c..da9ee0990f015c8b2ee8f457ea5664fc6a836e85 100644 (file)
@@ -4,22 +4,22 @@ builder
  <K:Ljava/lang/Object;V:Ljava/lang/Object;>()L1com/google/common/collect/ImmutableMap$Builder<TK;TV;>;
 copyOf
  <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/Map<+TK;+TV;>;)Lcom/google/common/collect/ImmutableMap<TK;TV;>;
- <K:Ljava/lang/Object;V:Ljava/lang/Object;>(Ljava/util/Map<+TK;+TV;>;)L1com/google/common/collect/ImmutableMap<TK;TV;>;
+ <K:Ljava/lang/Object;V:Ljava/lang/Object;>(L1java/util/Map<+TK;+TV;>;)L1com/google/common/collect/ImmutableMap<TK;TV;>;
 of
  <K:Ljava/lang/Object;V:Ljava/lang/Object;>()Lcom/google/common/collect/ImmutableMap<TK;TV;>;
  <K:Ljava/lang/Object;V:Ljava/lang/Object;>()L1com/google/common/collect/ImmutableMap<TK;TV;>;
 of
  <K:Ljava/lang/Object;V:Ljava/lang/Object;>(TK;TV;)Lcom/google/common/collect/ImmutableMap<TK;TV;>;
- <K:Ljava/lang/Object;V:Ljava/lang/Object;>(TK;TV;)L1com/google/common/collect/ImmutableMap<TK;TV;>;
+ <K:Ljava/lang/Object;V:Ljava/lang/Object;>(T1K;T1V;)L1com/google/common/collect/ImmutableMap<TK;TV;>;
 of
  <K:Ljava/lang/Object;V:Ljava/lang/Object;>(TK;TV;TK;TV;)Lcom/google/common/collect/ImmutableMap<TK;TV;>;
- <K:Ljava/lang/Object;V:Ljava/lang/Object;>(TK;TV;TK;TV;)L1com/google/common/collect/ImmutableMap<TK;TV;>;
+ <K:Ljava/lang/Object;V:Ljava/lang/Object;>(T1K;T1V;T1K;T1V;)L1com/google/common/collect/ImmutableMap<TK;TV;>;
 of
  <K:Ljava/lang/Object;V:Ljava/lang/Object;>(TK;TV;TK;TV;TK;TV;)Lcom/google/common/collect/ImmutableMap<TK;TV;>;
- <K:Ljava/lang/Object;V:Ljava/lang/Object;>(TK;TV;TK;TV;TK;TV;)L1com/google/common/collect/ImmutableMap<TK;TV;>;
+ <K:Ljava/lang/Object;V:Ljava/lang/Object;>(T1K;T1V;T1K;T1V;T1K;T1V;)L1com/google/common/collect/ImmutableMap<TK;TV;>;
 of
  <K:Ljava/lang/Object;V:Ljava/lang/Object;>(TK;TV;TK;TV;TK;TV;TK;TV;)Lcom/google/common/collect/ImmutableMap<TK;TV;>;
- <K:Ljava/lang/Object;V:Ljava/lang/Object;>(TK;TV;TK;TV;TK;TV;TK;TV;)L1com/google/common/collect/ImmutableMap<TK;TV;>;
+ <K:Ljava/lang/Object;V:Ljava/lang/Object;>(T1K;T1V;T1K;T1V;T1K;T1V;T1K;T1V;)L1com/google/common/collect/ImmutableMap<TK;TV;>;
 of
  <K:Ljava/lang/Object;V:Ljava/lang/Object;>(TK;TV;TK;TV;TK;TV;TK;TV;TK;TV;)Lcom/google/common/collect/ImmutableMap<TK;TV;>;
- <K:Ljava/lang/Object;V:Ljava/lang/Object;>(TK;TV;TK;TV;TK;TV;TK;TV;TK;TV;)L1com/google/common/collect/ImmutableMap<TK;TV;>;
+ <K:Ljava/lang/Object;V:Ljava/lang/Object;>(T1K;T1V;T1K;T1V;T1K;T1V;T1K;T1V;T1K;T1V;)L1com/google/common/collect/ImmutableMap<TK;TV;>;
index 93ed65ad1507ddabecdfc1e9f49846c5ca7968c5..0b74b1d882033a9b7e83736acd92573847b9d1b1 100644 (file)
@@ -4,34 +4,34 @@ builder
  <E:Ljava/lang/Object;>()L1com/google/common/collect/ImmutableSet$Builder<TE;>;
 copyOf
  <E:Ljava/lang/Object;>(Ljava/lang/Iterable<+TE;>;)Lcom/google/common/collect/ImmutableSet<TE;>;
- <E:Ljava/lang/Object;>(Ljava/lang/Iterable<+TE;>;)L1com/google/common/collect/ImmutableSet<TE;>;
+ <E:Ljava/lang/Object;>(L1java/lang/Iterable<+TE;>;)L1com/google/common/collect/ImmutableSet<TE;>;
 copyOf
  <E:Ljava/lang/Object;>(Ljava/util/Collection<+TE;>;)Lcom/google/common/collect/ImmutableSet<TE;>;
- <E:Ljava/lang/Object;>(Ljava/util/Collection<+TE;>;)L1com/google/common/collect/ImmutableSet<TE;>;
+ <E:Ljava/lang/Object;>(L1java/util/Collection<+TE;>;)L1com/google/common/collect/ImmutableSet<TE;>;
 copyOf
  <E:Ljava/lang/Object;>(Ljava/util/Iterator<+TE;>;)Lcom/google/common/collect/ImmutableSet<TE;>;
- <E:Ljava/lang/Object;>(Ljava/util/Iterator<+TE;>;)L1com/google/common/collect/ImmutableSet<TE;>;
+ <E:Ljava/lang/Object;>(L1java/util/Iterator<+TE;>;)L1com/google/common/collect/ImmutableSet<TE;>;
 copyOf
  <E:Ljava/lang/Object;>([TE;)Lcom/google/common/collect/ImmutableSet<TE;>;
- <E:Ljava/lang/Object;>([TE;)L1com/google/common/collect/ImmutableSet<TE;>;
+ <E:Ljava/lang/Object;>([1TE;)L1com/google/common/collect/ImmutableSet<TE;>;
 of
  <E:Ljava/lang/Object;>()Lcom/google/common/collect/ImmutableSet<TE;>;
  <E:Ljava/lang/Object;>()L1com/google/common/collect/ImmutableSet<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;)Lcom/google/common/collect/ImmutableSet<TE;>;
- <E:Ljava/lang/Object;>(TE;)L1com/google/common/collect/ImmutableSet<TE;>;
+ <E:Ljava/lang/Object;>(T1E;)L1com/google/common/collect/ImmutableSet<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;)Lcom/google/common/collect/ImmutableSet<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;)L1com/google/common/collect/ImmutableSet<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;)L1com/google/common/collect/ImmutableSet<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;)Lcom/google/common/collect/ImmutableSet<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;)L1com/google/common/collect/ImmutableSet<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;)L1com/google/common/collect/ImmutableSet<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;TE;)Lcom/google/common/collect/ImmutableSet<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;TE;)L1com/google/common/collect/ImmutableSet<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;T1E;)L1com/google/common/collect/ImmutableSet<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;)Lcom/google/common/collect/ImmutableSet<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;)L1com/google/common/collect/ImmutableSet<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;T1E;T1E;)L1com/google/common/collect/ImmutableSet<TE;>;
 of
  <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;[TE;)Lcom/google/common/collect/ImmutableSet<TE;>;
- <E:Ljava/lang/Object;>(TE;TE;TE;TE;TE;TE;[TE;)L1com/google/common/collect/ImmutableSet<TE;>;
+ <E:Ljava/lang/Object;>(T1E;T1E;T1E;T1E;T1E;T1E;[TE;)L1com/google/common/collect/ImmutableSet<TE;>;
index e7f7765c6977a1faf9f70fbd3c46434358e98e26..eea384b965ef33d53d5619cae6b5e2fec32ea552 100644 (file)
@@ -15,6 +15,7 @@ package org.eclipse.tracecompass.internal.lttng2.kernel.core;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.Plugin;
 import org.eclipse.core.runtime.Status;
+import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpEventMatching;
 import org.eclipse.tracecompass.internal.lttng2.kernel.core.event.matching.TcpLttngEventMatching;
 import org.eclipse.tracecompass.tmf.core.event.matching.TmfEventMatching;
@@ -25,6 +26,7 @@ import org.osgi.framework.BundleContext;
  * <p>
  * The activator class controls the plug-in life cycle
  */
+@NonNullByDefault({})
 public class Activator extends Plugin {
 
     // ------------------------------------------------------------------------
diff --git a/lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/package-info.java b/lttng/org.eclipse.tracecompass.lttng2.kernel.core/src/org/eclipse/tracecompass/internal/lttng2/kernel/core/package-info.java
new file mode 100644 (file)
index 0000000..df16161
--- /dev/null
@@ -0,0 +1,11 @@
+/*******************************************************************************
+ * Copyright (c) 2015 Ericsson
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *******************************************************************************/
+
+@org.eclipse.jdt.annotation.NonNullByDefault
+package org.eclipse.tracecompass.internal.lttng2.kernel.core;
index e5439af548d665abef3af0f9e1561ecf3627a423..53eb9e243d886c7ba5f64acdcb2365b8f6e125ee 100644 (file)
@@ -23,6 +23,7 @@ import java.util.List;
 import org.apache.log4j.ConsoleAppender;
 import org.apache.log4j.Logger;
 import org.apache.log4j.SimpleLayout;
+import org.eclipse.jdt.annotation.NonNull;
 import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
 import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
 import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
@@ -98,21 +99,21 @@ public class CallStackViewTest {
 
     /** Tooltips of the toolbar buttons */
 
-    private static final String ALIGN_VIEWS = "Align Views";
-    private static final String IMPORT_BINARY = "Import a binary file containing debugging symbols";
-    private static final String IMPORT_TEXT = "Import a text file containing the mapping between addresses and function names";
+    private static final @NonNull String ALIGN_VIEWS = "Align Views";
+    private static final @NonNull String IMPORT_BINARY = "Import a binary file containing debugging symbols";
+    private static final @NonNull String IMPORT_TEXT = "Import a text file containing the mapping between addresses and function names";
     // Separator
-    private static final String SORT_BY_NAME = "Sort threads by thread name";
-    private static final String SORT_BY_ID = "Sort threads by thread id";
-    private static final String SORT_BY_START = "Sort threads by start time";
+    private static final @NonNull String SORT_BY_NAME = "Sort threads by thread name";
+    private static final @NonNull String SORT_BY_ID = "Sort threads by thread id";
+    private static final @NonNull String SORT_BY_START = "Sort threads by start time";
     // Separator
-    private static final String RESET_TIME_SCALE = "Reset the Time Scale to Default";
-    private static final String SELECT_PREVIOUS_EVENT = "Select Previous Event";
-    private static final String SELECT_NEXT_EVENT = "Select Next Event";
-    private static final String SELECT_PREVIOUS_ITEM = "Select Previous Item";
-    private static final String SELECT_NEXT_ITEM = "Select Next Item";
-    private static final String ZOOM_IN = "Zoom In";
-    private static final String ZOOM_OUT = "Zoom Out";
+    private static final @NonNull String RESET_TIME_SCALE = "Reset the Time Scale to Default";
+    private static final @NonNull String SELECT_PREVIOUS_EVENT = "Select Previous Event";
+    private static final @NonNull String SELECT_NEXT_EVENT = "Select Next Event";
+    private static final @NonNull String SELECT_PREVIOUS_ITEM = "Select Previous Item";
+    private static final @NonNull String SELECT_NEXT_ITEM = "Select Next Item";
+    private static final @NonNull String ZOOM_IN = "Zoom In";
+    private static final @NonNull String ZOOM_OUT = "Zoom Out";
     // Separator
     private static final String PIN_VIEW = "Pin View";
     private static final List<String> TOOLBAR_BUTTONS_TOOLTIPS = ImmutableList.of(
index 8d6e097f2718d4954a44a37b87c036deee55d535..3acf3ad1110111d980b5bd1c79d583ce1ffcf0e4 100644 (file)
@@ -38,11 +38,11 @@ public class TreeMapStoreTest {
 
     private TreeMapStore<@NonNull ISegment> fSegmentStore;
 
-    private static final ISegment SEGMENT_2_6 = new BasicSegment(2, 6);
-    private static final ISegment SEGMENT_4_6 = new BasicSegment(4, 6);
-    private static final ISegment SEGMENT_4_8 = new BasicSegment(4, 8);
-    private static final ISegment SEGMENT_6_8 = new BasicSegment(6, 8);
-    private static final ISegment SEGMENT_10_14 = new BasicSegment(10, 14);
+    private static final @NonNull ISegment SEGMENT_2_6 = new BasicSegment(2, 6);
+    private static final @NonNull ISegment SEGMENT_4_6 = new BasicSegment(4, 6);
+    private static final @NonNull ISegment SEGMENT_4_8 = new BasicSegment(4, 8);
+    private static final @NonNull ISegment SEGMENT_6_8 = new BasicSegment(6, 8);
+    private static final @NonNull ISegment SEGMENT_10_14 = new BasicSegment(10, 14);
 
     private static final List<ISegment> SEGMENTS = ImmutableList.of(SEGMENT_2_6, SEGMENT_4_6, SEGMENT_4_8, SEGMENT_6_8, SEGMENT_10_14);
     private static final List<ISegment> REVERSE_SEGMENTS = Lists.reverse(SEGMENTS);
index c37015eab40b398564218c3f949ca2af4813f9aa..fe6e3a70ef9d072120f25a5fcca8fd3a4fb58c79 100644 (file)
@@ -14,6 +14,7 @@ package org.eclipse.tracecompass.tmf.tests.stubs.analysis;
 
 import java.util.Set;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
 import org.eclipse.tracecompass.tmf.core.analysis.TmfAnalysisRequirement;
 import org.eclipse.tracecompass.tmf.core.analysis.TmfAnalysisRequirement.ValuePriorityLevel;
 
@@ -23,6 +24,7 @@ import com.google.common.collect.ImmutableSet;
  * Factory class to facilitate requirement usage across test case
  */
 @SuppressWarnings("javadoc")
+@NonNullByDefault
 public final class AnalysisRequirementFactory {
 
     private AnalysisRequirementFactory() {}
index bd4c1cf3ccad3a264ad27e3583e48b67d3585f39..030cc9f832b46355ff2df51dd19bf364105264d7 100644 (file)
@@ -143,7 +143,7 @@ public class TmfEventField implements ITmfEventField {
      * @param labels the list of labels
      * @return the (flat) root list
      */
-    public static final ITmfEventField makeRoot(final String[] labels) {
+    public static final @NonNull ITmfEventField makeRoot(final String[] labels) {
         final ITmfEventField[] fields = new ITmfEventField[labels.length];
         for (int i = 0; i < labels.length; i++) {
             String label = checkNotNull(labels[i]);
index cd35c214ed5ff57da125aca1801c00a2649eb3e7..3adc922469a6f4282bde16f66cfc8e9b728c186f 100644 (file)
@@ -11,6 +11,8 @@
 
 package org.eclipse.tracecompass.internal.tmf.ui.editors;
 
+import org.eclipse.jdt.annotation.NonNullByDefault;
+
 import com.google.common.collect.ImmutableSet;
 
 
@@ -19,6 +21,7 @@ import com.google.common.collect.ImmutableSet;
  *
  * @noimplement
  */
+@NonNullByDefault
 public interface ITmfEventsEditorConstants {
 
     /**
This page took 0.036209 seconds and 5 git commands to generate.