8276657: XSLT compiler tries to define a class with empty name

Reviewed-by: naoto
This commit is contained in:
Joe Wang 2021-12-02 06:52:45 +00:00
parent 8198807b4a
commit a093cdddaf

View File

@ -58,7 +58,7 @@ import org.xml.sax.XMLReader;
* @author G. Todd Miller
* @author Morten Jorgensen
* @author John Howard (johnh@schemasoft.com)
* @LastModified: May 2021
* @LastModified: Nov 2021
*/
public final class XSLTC {
@ -460,8 +460,11 @@ public final class XSLTC {
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