Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix NPE in XPath evaluation #466

Merged
merged 1 commit into from
Feb 6, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
----------------------------------------------------------------------------*/
package org.deegree.feature.xpath;

import static java.util.Collections.emptyIterator;
import static org.deegree.commons.xml.CommonNamespaces.GML3_2_NS;
import static org.deegree.commons.xml.CommonNamespaces.GMLNS;
import static org.jaxen.JaxenConstants.EMPTY_ITERATOR;
Expand Down Expand Up @@ -252,13 +253,15 @@ public Iterator<?> getChildAxisIterator( Object node ) {
}
iter = xpathNodes.iterator();
} else {
Object propValue = prop.getValue();
final Object propValue = prop.getValue();
if ( propValue instanceof GMLObject ) {
GMLObject castNode = (GMLObject) propValue;
iter = new SingleObjectIterator( new GMLObjectNode<GMLObject, Property>( propNode, castNode ) );
} else if ( propValue instanceof PrimitiveValue ) {
iter = new SingleObjectIterator( new PrimitiveNode<Property>( (PropertyNode) node,
(PrimitiveValue) propValue ) );
} else if ( propValue == null ) {
iter = emptyIterator();
} else {
// TODO remove this case
iter = new SingleObjectIterator(
Expand Down