analysis.timing: Add missing @Nullable annotations
authorAlexandre Montplaisir <alexmonthy@efficios.com>
Tue, 23 Feb 2016 21:38:03 +0000 (16:38 -0500)
committerAlexandre Montplaisir <alexmonthy@efficios.com>
Thu, 25 Feb 2016 20:21:26 +0000 (15:21 -0500)
The updateTableModel() method supports null parameters, we just need
to add missing @Nullable annotations to fix a compilation warning.

Also annotate CompletableFuture.supplyAsync() methods, they return
a new CompletableFuture, so its return can be @NonNull.

Change-Id: Ieef346b03d0e676c19c4f8cea3568870fc852e37
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Reviewed-on: https://git.eclipse.org/r/67187
Reviewed-by: Hudson CI
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
analysis/org.eclipse.tracecompass.analysis.timing.ui/src/org/eclipse/tracecompass/analysis/timing/ui/views/segmentstore/density/AbstractSegmentStoreDensityView.java
analysis/org.eclipse.tracecompass.analysis.timing.ui/src/org/eclipse/tracecompass/analysis/timing/ui/views/segmentstore/density/AbstractSegmentStoreDensityViewer.java
analysis/org.eclipse.tracecompass.analysis.timing.ui/src/org/eclipse/tracecompass/analysis/timing/ui/views/segmentstore/density/ISegmentStoreDensityViewerDataListener.java
common/org.eclipse.tracecompass.common.core/annotations/java/util/concurrent/CompletableFuture.eea [new file with mode: 0644]

index 3db21074d0bf8d14a73119711cc83b59e1a6eec4..bea16d473b7ebddb1a895cccce4a7eba1c046e0d 100644 (file)
@@ -64,7 +64,7 @@ public abstract class AbstractSegmentStoreDensityView extends TmfView {
         }
 
         @Override
-        public void dataSelectionChanged(List<ISegment> data) {
+        public void dataSelectionChanged(@Nullable List<ISegment> data) {
             updateTableModel(data);
         }
     }
index 70f025bff9f025283cbe2a08aaf854829fcaa8d8..266266b7dfd6fbdc5d551a574169f4549db4945c 100644 (file)
@@ -201,7 +201,7 @@ public abstract class AbstractSegmentStoreDensityViewer extends TmfViewer {
         computeDataAsync(fCurrentTimeRange, durationRange).thenAccept((data) -> applyData(data));
     }
 
-    private CompletableFuture<List<ISegment>> computeDataAsync(final TmfTimeRange timeRange, final Range durationRange) {
+    private CompletableFuture<@Nullable List<ISegment>> computeDataAsync(final TmfTimeRange timeRange, final Range durationRange) {
         return CompletableFuture.supplyAsync(() -> computeData(timeRange, durationRange));
     }
 
@@ -224,7 +224,7 @@ public abstract class AbstractSegmentStoreDensityViewer extends TmfViewer {
                     return input != null && input.getLength() >= durationRange.lower && input.getLength() <= durationRange.upper;
                 }
             };
-            intersectingElements = Iterators.<ISegment> filter(intersectingElements, predicate);
+            intersectingElements = Iterators.filter(intersectingElements, predicate);
         }
 
         return Lists.newArrayList(intersectingElements);
index a447feca2e0dd9d8d24a1e7d89331d78db6c22e1..2089753e74843b8b2ff952a46527b1dffd7dbb9d 100644 (file)
@@ -11,6 +11,7 @@ package org.eclipse.tracecompass.analysis.timing.ui.views.segmentstore.density;
 
 import java.util.List;
 
+import org.eclipse.jdt.annotation.Nullable;
 import org.eclipse.tracecompass.segmentstore.core.ISegment;
 
 /**
@@ -32,5 +33,5 @@ public interface ISegmentStoreDensityViewerDataListener {
      * @param newSelectionData
      *            the new selection of the data
      */
-    void dataSelectionChanged(List<ISegment> newSelectionData);
+    void dataSelectionChanged(@Nullable List<ISegment> newSelectionData);
 }
diff --git a/common/org.eclipse.tracecompass.common.core/annotations/java/util/concurrent/CompletableFuture.eea b/common/org.eclipse.tracecompass.common.core/annotations/java/util/concurrent/CompletableFuture.eea
new file mode 100644 (file)
index 0000000..09d724a
--- /dev/null
@@ -0,0 +1,7 @@
+class java/util/concurrent/CompletableFuture
+supplyAsync
+ <U:Ljava/lang/Object;>(Ljava/util/function/Supplier<TU;>;)Ljava/util/concurrent/CompletableFuture<TU;>;
+ <U:Ljava/lang/Object;>(Ljava/util/function/Supplier<TU;>;)L1java/util/concurrent/CompletableFuture<TU;>;
+supplyAsync
+ <U:Ljava/lang/Object;>(Ljava/util/function/Supplier<TU;>;Ljava/util/concurrent/Executor;)Ljava/util/concurrent/CompletableFuture<TU;>;
+ <U:Ljava/lang/Object;>(Ljava/util/function/Supplier<TU;>;Ljava/util/concurrent/Executor;)L1java/util/concurrent/CompletableFuture<TU;>;
This page took 0.056519 seconds and 5 git commands to generate.