diff options
author | Gary Gregory <garydgregory@gmail.com> | 2021-12-04 10:02:28 -0500 |
---|---|---|
committer | Gary Gregory <garydgregory@gmail.com> | 2021-12-04 10:02:28 -0500 |
commit | 49cfcc2c479e606bfb9b1b26f50b63397222d965 (patch) | |
tree | 30374a329c799cfa8174a4d9df7f6075e63bec95 /src/main/java/org/apache/commons/lang3/ThreadUtils.java | |
parent | bf48d8a53cc6f4e702412dd864a8741f2a06ea36 (diff) | |
download | apache-commons-lang-49cfcc2c479e606bfb9b1b26f50b63397222d965.tar.gz |
Better param names.
Diffstat (limited to 'src/main/java/org/apache/commons/lang3/ThreadUtils.java')
-rw-r--r-- | src/main/java/org/apache/commons/lang3/ThreadUtils.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/main/java/org/apache/commons/lang3/ThreadUtils.java b/src/main/java/org/apache/commons/lang3/ThreadUtils.java index 15b13a4cc..db9c6c6ef 100644 --- a/src/main/java/org/apache/commons/lang3/ThreadUtils.java +++ b/src/main/java/org/apache/commons/lang3/ThreadUtils.java @@ -213,7 +213,7 @@ public class ThreadUtils { /** * Select all active thread groups which match the given predicate and which is a subgroup of the given thread group (or one of its subgroups). * - * @param group the thread group + * @param threadGroup the thread group * @param recurse if {@code true} then evaluate the predicate recursively on all thread groups in all subgroups of the given group * @param predicate the predicate * @return An unmodifiable {@code Collection} of active thread groups which match the given predicate and which is a subgroup of the given thread group @@ -221,15 +221,15 @@ public class ThreadUtils { * @throws SecurityException if the current thread cannot modify * thread groups from this thread's thread group up to the system thread group */ - public static Collection<ThreadGroup> findThreadGroups(final ThreadGroup group, final boolean recurse, final ThreadGroupPredicate predicate) { - Validate.notNull(group, "group"); + public static Collection<ThreadGroup> findThreadGroups(final ThreadGroup threadGroup, final boolean recurse, final ThreadGroupPredicate predicate) { + Validate.notNull(threadGroup, "group"); Validate.notNull(predicate, "predicate"); - int count = group.activeGroupCount(); + int count = threadGroup.activeGroupCount(); ThreadGroup[] threadGroups; do { threadGroups = new ThreadGroup[count + (count / 2) + 1]; //slightly grow the array size - count = group.enumerate(threadGroups, recurse); + count = threadGroup.enumerate(threadGroups, recurse); //return value of enumerate() must be strictly less than the array size according to javadoc } while (count >= threadGroups.length); @@ -276,7 +276,7 @@ public class ThreadUtils { /** * Select all active threads which match the given predicate and which belongs to the given thread group (or one of its subgroups). * - * @param group the thread group + * @param threadGroup the thread group * @param recurse if {@code true} then evaluate the predicate recursively on all threads in all subgroups of the given group * @param predicate the predicate * @return An unmodifiable {@code Collection} of active threads which match the given predicate and which belongs to the given thread group @@ -284,15 +284,15 @@ public class ThreadUtils { * @throws SecurityException if the current thread cannot modify * thread groups from this thread's thread group up to the system thread group */ - public static Collection<Thread> findThreads(final ThreadGroup group, final boolean recurse, final ThreadPredicate predicate) { - Validate.notNull(group, "The group must not be null"); + public static Collection<Thread> findThreads(final ThreadGroup threadGroup, final boolean recurse, final ThreadPredicate predicate) { + Validate.notNull(threadGroup, "The group must not be null"); Validate.notNull(predicate, "The predicate must not be null"); - int count = group.activeCount(); + int count = threadGroup.activeCount(); Thread[] threads; do { threads = new Thread[count + (count / 2) + 1]; //slightly grow the array size - count = group.enumerate(threads, recurse); + count = threadGroup.enumerate(threads, recurse); //return value of enumerate() must be strictly less than the array size according to javadoc } while (count >= threads.length); |