1 Star 0 Fork 75

莫比乌斯 / openjdk-1.8.0

forked from src-openEuler / openjdk-1.8.0 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
fixing-a-bug-in-the-processing-of-default-attributes.patch 1.82 KB
一键复制 编辑 原始数据 按行查看 历史
wanghao 提交于 2023-08-01 15:30 . I7PICQ: upgrade to jdk8u382-ga
From 93a6617cd05d494c7a761c5565e412f03aefb569 Mon Sep 17 00:00:00 2001
Date: Thu, 27 Jul 2023 12:45:54 +0800
Subject: [PATCH] [Huawei]Fixing a bug in the processing of default attributes
---
.../apache/xerces/internal/impl/xs/XMLSchemaValidator.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java b/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java
index 020e35cd4..7a2b8efb5 100644
--- a/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java
+++ b/jaxp/src/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java
@@ -2943,9 +2943,11 @@ public class XMLSchemaValidator
attName =
new QName(null, currDecl.fName, currDecl.fName, currDecl.fTargetNamespace);
String normalized = (defaultValue != null) ? defaultValue.stringValue() : "";
- int attrIndex = attributes.addAttribute(attName, "CDATA", normalized);
+ int attrIndex;
if (attributes instanceof XMLAttributesImpl) {
XMLAttributesImpl attrs = (XMLAttributesImpl) attributes;
+ attrIndex = attrs.getLength();
+ attrs.addAttributeNS(attName, "CDATA", normalized);
boolean schemaId =
defaultValue != null
&& defaultValue.memberType != null
@@ -2953,6 +2955,9 @@ public class XMLSchemaValidator
: currDecl.fType.isIDType();
attrs.setSchemaId(attrIndex, schemaId);
}
+ else {
+ attrIndex = attributes.addAttribute(attName, "CDATA", normalized);
+ }
if (fAugPSVI) {
--
2.19.1
1
https://gitee.com/neu-mobi/openjdk-1.8.0.git
git@gitee.com:neu-mobi/openjdk-1.8.0.git
neu-mobi
openjdk-1.8.0
openjdk-1.8.0
master

搜索帮助