Skip to content

Commit

Permalink
Attempt to help IJ infer nullability annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
aNNiMON committed Apr 13, 2018
1 parent 2b2a5b0 commit ad88643
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions stream/src/main/java/com/annimon/stream/Objects.java
Expand Up @@ -125,7 +125,7 @@ public static int compareLong(long x, long y) {
public static <T> T requireNonNull(T obj) {
if (obj == null)
throw new NullPointerException();
return obj;
else return obj;
}

/**
Expand All @@ -141,7 +141,7 @@ public static <T> T requireNonNull(T obj) {
public static <T> T requireNonNull(T obj, String message) {
if (obj == null)
throw new NullPointerException(message);
return obj;
else return obj;
}

/**
Expand All @@ -159,7 +159,7 @@ public static <T> T requireNonNull(T obj, String message) {
public static <T> T requireNonNull(T obj, Supplier<String> messageSupplier) {
if (obj == null)
throw new NullPointerException(messageSupplier.get());
return obj;
else return obj;
}

/**
Expand Down

0 comments on commit ad88643

Please sign in to comment.