Call long
as l
instead of i
(#10578)
Motivation: Long should be called `l` instead of `i` because `i` is generally used for `int`. Modification: Changed `i` to `l`. Result: Better naming
This commit is contained in:
parent
aa85ea9947
commit
836bb74051
@ -50,11 +50,11 @@ public final class ObjectUtil {
|
||||
* Checks that the given argument is strictly positive. If it is not, throws {@link IllegalArgumentException}.
|
||||
* Otherwise, returns the argument.
|
||||
*/
|
||||
public static long checkPositive(long i, String name) {
|
||||
if (i <= 0) {
|
||||
throw new IllegalArgumentException(name + ": " + i + " (expected: > 0)");
|
||||
public static long checkPositive(long l, String name) {
|
||||
if (l <= 0) {
|
||||
throw new IllegalArgumentException(name + ": " + l + " (expected: > 0)");
|
||||
}
|
||||
return i;
|
||||
return l;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -72,11 +72,11 @@ public final class ObjectUtil {
|
||||
* Checks that the given argument is positive or zero. If it is not, throws {@link IllegalArgumentException}.
|
||||
* Otherwise, returns the argument.
|
||||
*/
|
||||
public static long checkPositiveOrZero(long i, String name) {
|
||||
if (i < 0) {
|
||||
throw new IllegalArgumentException(name + ": " + i + " (expected: >= 0)");
|
||||
public static long checkPositiveOrZero(long l, String name) {
|
||||
if (l < 0) {
|
||||
throw new IllegalArgumentException(name + ": " + l + " (expected: >= 0)");
|
||||
}
|
||||
return i;
|
||||
return l;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user