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:
Aayush Atharva 2020-09-16 11:28:03 +05:30 committed by GitHub
parent aa85ea9947
commit 836bb74051
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;
}
/**