Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
8291640: java/beans/XMLDecoder/8028054/Task.java should use the 3-arg…
… Class.forName

Backport-of: dedc05c
  • Loading branch information
theaoqi authored and Paul Hohensee committed Sep 12, 2022
1 parent c6a8536 commit 2070269
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions test/jdk/java/beans/XMLDecoder/8028054/Task.java
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2022, 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
Expand Down Expand Up @@ -130,8 +130,9 @@ static List<Class<?>> getClasses(int count) throws Exception {
.map(s -> s.substring(s.indexOf("java")))
.collect(Collectors.toList());

ClassLoader scl = ClassLoader.getSystemClassLoader();
for (String name : fileNames) {
classes.add(Class.forName(name));
classes.add(Class.forName(name, false, scl));
if (count == classes.size()) {
break;
}
Expand Down
Expand Up @@ -35,7 +35,7 @@
* @author Sergey Malenkov
* @modules java.desktop/com.sun.beans.finder
* @compile -XDignore.symbol.file TestConstructorFinder.java
* @run main/othervm --enable-preview TestConstructorFinder
* @run main TestConstructorFinder
*/

public class TestConstructorFinder {
Expand Down
Expand Up @@ -35,7 +35,7 @@
* @author Sergey Malenkov
* @modules java.desktop/com.sun.beans.finder
* @compile -XDignore.symbol.file TestMethodFinder.java
* @run main/othervm --enable-preview TestMethodFinder
* @run main TestMethodFinder
*/

public class TestMethodFinder {
Expand Down

1 comment on commit 2070269

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.