Skip to content

Commit f87bb76

Browse files
committed
8381385: nsk/jdi/ClassLoaderReference/visibleClasses/visibleclasses002/ fails with --enable-preview and Java Usage Tracker enabled
Reviewed-by: dholmes, lmesnik
1 parent a2e840f commit f87bb76

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/hotspot/jtreg/vmTestbase/nsk/jdi/ClassLoaderReference/visibleClasses/visibleclasses002.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2002, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2002, 2026, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -138,7 +138,9 @@ private static void execTest() {
138138
}
139139
}
140140
} catch (ClassNotLoadedException e) {
141-
throw new Failure("Unexpected ClassNotLoadedException while getting componentType() of : " + refType);
141+
// ArrayType.componentType() can throw ClassNotLoadedException if the
142+
// type is loaded but not yet prepared. Just swallow the exception.
143+
display("ClassNotLoadedException while getting componentType() of " + refType);
142144
}
143145

144146
}

0 commit comments

Comments
 (0)