Skip to content

[3.x] Remove deprecated method from 2.x #6769

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 17, 2019
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");
}
}