Skip to content

Commit

Permalink
8276657: XSLT compiler tries to define a class with empty name
Browse files Browse the repository at this point in the history
Reviewed-by: naoto
  • Loading branch information
JoeWang-Java committed Dec 2, 2021
1 parent 8198807 commit a093cdd
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -58,7 +58,7 @@
* @author G. Todd Miller
* @author Morten Jorgensen
* @author John Howard (johnh@schemasoft.com)
* @LastModified: May 2021
* @LastModified: Nov 2021
*/
public final class XSLTC {

Expand Down Expand Up @@ -460,8 +460,11 @@ public boolean compile(InputSource input, String name) {
if (name != null) {
setClassName(name);
}
else if (systemId != null && !systemId.equals("")) {
setClassName(Util.baseName(systemId));
else if (systemId != null && !systemId.isEmpty()) {
String clsName = Util.baseName(systemId);
if (clsName != null && !clsName.isEmpty()) {
setClassName(clsName);
}
}

// Ensure we have a non-empty class name at this point
Expand Down

3 comments on commit a093cdd

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@GoeLin
Copy link
Member

@GoeLin GoeLin commented on a093cdd Mar 11, 2022

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on a093cdd Mar 11, 2022

Choose a reason for hiding this comment

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

@GoeLin the backport was successfully created on the branch GoeLin-backport-a093cddd in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev: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 a093cddd from the openjdk/jdk repository.

The commit being backported was authored by Joe Wang on 2 Dec 2021 and was reviewed by Naoto Sato.

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/jdk17u-dev:

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

Please sign in to comment.