mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-22 03:54:33 +02:00
8133924: NPE may be thrown when xsltc select a non-existing node after JDK-8062518
Reviewed-by: aefimov, lancea, joehw
This commit is contained in:
parent
11dee9e7fe
commit
804a447ee4
1 changed files with 6 additions and 8 deletions
|
@ -1,9 +1,9 @@
|
||||||
/*
|
/*
|
||||||
* reserved comment block
|
* Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT REMOVE OR ALTER!
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Copyright 2001-2004 The Apache Software Foundation.
|
* Copyright 2005 The Apache Software Foundation.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -17,9 +17,6 @@
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
/*
|
|
||||||
* $Id: MultiDOM.java,v 1.5 2005/09/28 13:48:36 pvedula Exp $
|
|
||||||
*/
|
|
||||||
|
|
||||||
package com.sun.org.apache.xalan.internal.xsltc.dom;
|
package com.sun.org.apache.xalan.internal.xsltc.dom;
|
||||||
|
|
||||||
|
@ -35,6 +32,7 @@ import com.sun.org.apache.xml.internal.dtm.DTMAxisIterator;
|
||||||
import com.sun.org.apache.xml.internal.dtm.DTMManager;
|
import com.sun.org.apache.xml.internal.dtm.DTMManager;
|
||||||
import com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase;
|
import com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIteratorBase;
|
||||||
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase;
|
import com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase;
|
||||||
|
import com.sun.org.apache.xml.internal.dtm.ref.DTMAxisIterNodeList;
|
||||||
import com.sun.org.apache.xml.internal.utils.SuballocatedIntVector;
|
import com.sun.org.apache.xml.internal.utils.SuballocatedIntVector;
|
||||||
|
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
|
@ -569,7 +567,7 @@ public final class MultiDOM implements DOM {
|
||||||
public NodeList makeNodeList(DTMAxisIterator iter) {
|
public NodeList makeNodeList(DTMAxisIterator iter) {
|
||||||
int index = iter.next();
|
int index = iter.next();
|
||||||
if (index == DTM.NULL) {
|
if (index == DTM.NULL) {
|
||||||
return null;
|
return new DTMAxisIterNodeList(null, null);
|
||||||
}
|
}
|
||||||
iter.reset();
|
iter.reset();
|
||||||
return _adapters[getDTMId(index)].makeNodeList(iter);
|
return _adapters[getDTMId(index)].makeNodeList(iter);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue