Navigation Menu

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

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: yan
Backport-of: a093cdddaf5ab88eb84a147e523db5c3e1be54be
  • Loading branch information
Olga Mikhaltsova committed Apr 8, 2022
1 parent 6e0cb9d commit 99453b0
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: July 2019
* @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

1 comment on commit 99453b0

@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.