aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/apache/commons/lang3/ThreadUtils.java
diff options
context:
space:
mode:
authorGary Gregory <garydgregory@gmail.com>2020-11-15 10:40:31 -0500
committerGary Gregory <garydgregory@gmail.com>2020-11-15 10:40:31 -0500
commit43b2326713ab952833c2ed4c88fbb0b34cb65436 (patch)
treee3bd45aa30206ea9c8f40383e599f8e4d0f99726 /src/main/java/org/apache/commons/lang3/ThreadUtils.java
parentfe1c7903a8b97badb59f4c63b440c35bee4cf6c1 (diff)
downloadapache-commons-lang-43b2326713ab952833c2ed4c88fbb0b34cb65436.tar.gz
Consistently use just the parameter name for the message of
NullPointerExceptions.
Diffstat (limited to 'src/main/java/org/apache/commons/lang3/ThreadUtils.java')
-rw-r--r--src/main/java/org/apache/commons/lang3/ThreadUtils.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/main/java/org/apache/commons/lang3/ThreadUtils.java b/src/main/java/org/apache/commons/lang3/ThreadUtils.java
index fef3dc850..7d52695a3 100644
--- a/src/main/java/org/apache/commons/lang3/ThreadUtils.java
+++ b/src/main/java/org/apache/commons/lang3/ThreadUtils.java
@@ -50,7 +50,7 @@ public class ThreadUtils {
* thread groups from this thread's thread group up to the system thread group
*/
public static Thread findThreadById(final long threadId, final ThreadGroup threadGroup) {
- Validate.notNull(threadGroup, "The thread group must not be null");
+ Validate.notNull(threadGroup, "threadGroup");
final Thread thread = findThreadById(threadId);
if (thread != null && threadGroup.equals(thread.getThreadGroup())) {
return thread;
@@ -73,7 +73,7 @@ public class ThreadUtils {
* thread groups from this thread's thread group up to the system thread group
*/
public static Thread findThreadById(final long threadId, final String threadGroupName) {
- Validate.notNull(threadGroupName, "The thread group name must not be null");
+ Validate.notNull(threadGroupName, "threadGroupName");
final Thread thread = findThreadById(threadId);
if (thread != null && thread.getThreadGroup() != null && thread.getThreadGroup().getName().equals(threadGroupName)) {
return thread;
@@ -114,8 +114,8 @@ public class ThreadUtils {
* thread groups from this thread's thread group up to the system thread group
*/
public static Collection<Thread> findThreadsByName(final String threadName, final String threadGroupName) {
- Validate.notNull(threadName, "The thread name must not be null");
- Validate.notNull(threadGroupName, "The thread group name must not be null");
+ Validate.notNull(threadName, "threadName");
+ Validate.notNull(threadGroupName, "threadGroupName");
final Collection<ThreadGroup> threadGroups = findThreadGroups(new NamePredicate(threadGroupName));
@@ -305,7 +305,7 @@ public class ThreadUtils {
*/
public NamePredicate(final String name) {
super();
- Validate.notNull(name, "The name must not be null");
+ Validate.notNull(name, "name");
this.name = name;
}
@@ -422,8 +422,8 @@ public class ThreadUtils {
* 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, "The group must not be null");
- Validate.notNull(predicate, "The predicate must not be null");
+ Validate.notNull(group, "group");
+ Validate.notNull(predicate, "predicate");
int count = group.activeGroupCount();
ThreadGroup[] threadGroups;