RFR (JDK 12/java.xml) 8177286: AttributeSet: attempt to compare Qname and String
Joe Wang
huizhe.wang at oracle.com
Mon Nov 26 19:59:19 UTC 2018
Hi,
Please review a quick fix that compares the String with the QName's
string representation.
JBS: https://bugs.openjdk.java.net/browse/JDK-8177286
Diff:
---
a/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java
+++
b/src/java.xml/share/classes/com/sun/org/apache/xalan/internal/xsltc/compiler/AttributeSet.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights
reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
@@ -95,7 +95,7 @@
parser.reportError(Constants.ERROR, err);
}
_name = parser.getQNameIgnoreDefaultNs(name);
- if ((_name == null) || (_name.equals(EMPTYSTRING))) {
+ if ((_name == null) ||
(_name.getStringRep().equals(EMPTYSTRING))) {
ErrorMsg msg = new
ErrorMsg(ErrorMsg.UNNAMED_ATTRIBSET_ERR, this);
parser.reportError(Constants.ERROR, msg);
}
Thanks,
Joe
More information about the core-libs-dev
mailing list