From: <svn...@os...> - 2012-05-08 20:50:50
|
Author: nielscharlier Date: 2012-05-08 13:50:44 -0700 (Tue, 08 May 2012) New Revision: 38705 Modified: trunk/modules/extension/app-schema/app-schema/src/main/java/org/geotools/data/complex/NestedAttributeMapping.java Log: app-schema fix null filters bug Modified: trunk/modules/extension/app-schema/app-schema/src/main/java/org/geotools/data/complex/NestedAttributeMapping.java =================================================================== --- trunk/modules/extension/app-schema/app-schema/src/main/java/org/geotools/data/complex/NestedAttributeMapping.java 2012-05-06 10:24:36 UTC (rev 38704) +++ trunk/modules/extension/app-schema/app-schema/src/main/java/org/geotools/data/complex/NestedAttributeMapping.java 2012-05-08 20:50:44 UTC (rev 38705) @@ -45,6 +45,7 @@ import org.opengis.filter.identity.FeatureId; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.xml.sax.helpers.NamespaceSupport; +import java.util.Collections; /** * This class represents AttributeMapping for attributes that are nested inside another complex @@ -355,6 +356,10 @@ public List<Feature> getFeatures(Object source, Object foreignKeyValue, List<Object> idValues, CoordinateReferenceSystem reprojection, Object feature, List<PropertyName> selectedProperties, boolean includeMandatory) throws IOException { + if (foreignKeyValue == null) { + return Collections.<Feature>emptyList(); + } + if (isSameSource()) { // if linkField is null, this method shouldn't be called because the mapping // should use the same table, and handles it differently |