mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-06 00:18:34 +00:00
8340276: Test java/lang/management/ThreadMXBean/Locks.java failed with NullPointerException
Reviewed-by: cjplummer, lmesnik
This commit is contained in:
parent
67198992ce
commit
c58fbef05e
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -422,6 +422,9 @@ public class Locks {
|
||||
lock + " expected to have owner");
|
||||
}
|
||||
for (ThreadInfo info1 : infos) {
|
||||
if (info1 == null) {
|
||||
continue; // Missing thread, e.g. completed. Ignore.
|
||||
}
|
||||
if (info1.getThreadId() == threadId) {
|
||||
ownerInfo = info1;
|
||||
break;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user