< prev index next >
src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/SubstitutionGroupHandler.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
@@ -28,19 +28,20 @@
import com.sun.org.apache.xerces.internal.xs.XSTypeDefinition;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Objects;
/**
* To store and validate information about substitutionGroup
*
* @xerces.internal
*
* @author Sandy Gao, IBM
*
- * @LastModified: Nov 2017
+ * @LastModified: July 2019
*/
public class SubstitutionGroupHandler {
private static final XSElementDecl[] EMPTY_GROUP = new XSElementDecl[0];
@@ -55,12 +56,12 @@
}
// 3.9.4 Element Sequence Locally Valid (Particle) 2.3.3
// check whether one element decl matches an element with the given qname
public XSElementDecl getMatchingElemDecl(QName element, XSElementDecl exemplar) {
- if (element.localpart == exemplar.fName &&
- element.uri == exemplar.fTargetNamespace) {
+ if (Objects.equals(element.localpart, exemplar.fName) &&
+ Objects.equals(element.uri, exemplar.fTargetNamespace)) {
return exemplar;
}
// if the exemplar is not a global element decl, then it's not possible
// to be substituted by another element.
< prev index next >