From 836bb74051da73b3c56751ed7555847559d497fa Mon Sep 17 00:00:00 2001 From: Aayush Atharva Date: Wed, 16 Sep 2020 11:28:03 +0530 Subject: [PATCH] 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 --- .../java/io/netty/util/internal/ObjectUtil.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/common/src/main/java/io/netty/util/internal/ObjectUtil.java b/common/src/main/java/io/netty/util/internal/ObjectUtil.java index cbac561f32..253fb3a317 100644 --- a/common/src/main/java/io/netty/util/internal/ObjectUtil.java +++ b/common/src/main/java/io/netty/util/internal/ObjectUtil.java @@ -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; } /**