Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,17 +128,4 @@ public boolean test(Object o1, Object o2) {
return ObjectHelper.equals(o1, o2);
}
}

/**
* Trap null-check attempts on primitives.
* @param value the value to check
* @param message the message to print
* @return the value
* @deprecated this method should not be used as there is no need
* to check primitives for nullness.
*/
@Deprecated
public static long requireNonNull(long value, String message) {
throw new InternalError("Null check on a primitive: " + message);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,4 @@ public void compareLong() {
assertEquals(0, ObjectHelper.compare(0L, 0L));
assertEquals(1, ObjectHelper.compare(2L, 0L));
}

@SuppressWarnings("deprecation")
@Test(expected = InternalError.class)
public void requireNonNullPrimitive() {
ObjectHelper.requireNonNull(0, "value");
}
}