Skip to content

Commit

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

Co-authored-by: Alan Bateman <alanb@openjdk.org>
Reviewed-by: alanb, prr
  • Loading branch information
2 people authored and prrace committed Aug 11, 2022
1 parent 3d20a8b commit dedc05c
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

3 comments on commit dedc05c

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@theaoqi
Copy link
Member Author

Choose a reason for hiding this comment

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

/backport jdk19u

@openjdk
Copy link

@openjdk openjdk bot commented on dedc05c Aug 24, 2022

Choose a reason for hiding this comment

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

@theaoqi the backport was successfully created on the branch theaoqi-backport-dedc05cb in my personal fork of openjdk/jdk19u. To create a pull request with this backport targeting openjdk/jdk19u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit dedc05cb from the openjdk/jdk repository.

The commit being backported was authored by Ao Qi on 11 Aug 2022 and was reviewed by Alan Bateman and Phil Race.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk19u:

$ git fetch https://github.com/openjdk-bots/jdk19u theaoqi-backport-dedc05cb:theaoqi-backport-dedc05cb
$ git checkout theaoqi-backport-dedc05cb
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk19u theaoqi-backport-dedc05cb

Please sign in to comment.