Navigation Menu

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
Backport-of: a093cdddaf5ab88eb84a147e523db5c3e1be54be
  • Loading branch information
GoeLin committed Mar 11, 2022
1 parent 79cce16 commit 3c6aecd
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 3c6aecd

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@RealCLanger
Copy link
Contributor

Choose a reason for hiding this comment

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

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 3c6aecd Mar 25, 2022

Choose a reason for hiding this comment

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

@RealCLanger Could not automatically backport 3c6aecd3 to openjdk/jdk11u-dev due to conflicts in the following files:

  • src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/XSLTC.java

To manually resolve these conflicts run the following commands in your personal fork of openjdk/jdk11u-dev:

$ git checkout -b RealCLanger-backport-3c6aecd3
$ git fetch --no-tags https://git.openjdk.java.net/jdk17u-dev 3c6aecd395e2dd6829815dcaa9d0e17d252131ed
$ git cherry-pick --no-commit 3c6aecd395e2dd6829815dcaa9d0e17d252131ed
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 3c6aecd395e2dd6829815dcaa9d0e17d252131ed'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u-dev with the title Backport 3c6aecd395e2dd6829815dcaa9d0e17d252131ed.

Please sign in to comment.