common: Rectify some annotations in NonNullUtils
authorAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Fri, 30 Oct 2015 09:42:35 +0000 (05:42 -0400)
committerAlexandre Montplaisir <alexmonthy@voxpopuli.im>
Tue, 3 Nov 2015 18:56:02 +0000 (13:56 -0500)
In-line genereic type definitions should not have @Nullable/@NonNull
annotations. These should be only on the "real" parameter and/or return
types.

Change-Id: Iba75a9cf6eb9cbe4662eec25089fa91ffa079728
Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-on: https://git.eclipse.org/r/59324
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
common/org.eclipse.tracecompass.common.core/src/org/eclipse/tracecompass/common/core/NonNullUtils.java

index c1008edae3720b72fd774fa0d02eefb3dbcb32cf..3b15a746612ef11a8251fa4c51b4b77d990b0661 100644 (file)
@@ -102,7 +102,7 @@ public final class NonNullUtils {
      *             If the reference was actually null
      * @since 2.0
      */
-    public static <@Nullable T> T[] checkNotNull(T @Nullable [] array) {
+    public static <T> T[] checkNotNull(T @Nullable [] array) {
         if (array == null) {
             throw new NullPointerException();
         }
@@ -123,7 +123,7 @@ public final class NonNullUtils {
      *             If the reference was actually null
      * @since 2.0
      */
-    public static <@Nullable T, C extends Iterable<T>> C checkNotNull(@Nullable C container) {
+    public static <T, C extends Iterable<T>> C checkNotNull(@Nullable C container) {
         if (container == null) {
             throw new NullPointerException();
         }
@@ -144,7 +144,7 @@ public final class NonNullUtils {
      *             If the reference was actually null
      * @since 2.0
      */
-    public static <@Nullable K, @Nullable V, M extends Map<K, V>> M checkNotNull(@Nullable M map) {
+    public static <K, V, M extends Map<K, V>> M checkNotNull(@Nullable M map) {
         if (map == null) {
             throw new NullPointerException();
         }
This page took 0.032124 seconds and 5 git commands to generate.