Skip to content

Commit

Permalink
Handle empty capabilities on DescribeLayer
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakarFin committed Aug 15, 2023
1 parent d8ce410 commit 6600cf4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,9 @@ private Map<String, Object> getControlData (LayerCapabilitiesWFS caps, WFSLayerA
if (styleType == null) {
String geomName = caps.getGeometryField();
FeaturePropertyType fpt = caps.getFeatureProperty(geomName);
styleType = WFSConversionHelper.getStyleType(fpt.type);
if (fpt != null) {
styleType = WFSConversionHelper.getStyleType(fpt.type);
}
}
data.put(WFSLayerAttributes.KEY_STYLE_TYPE, styleType);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ public void setSupportedCrsURIs(Set<String> uris) {

@JsonIgnore
public FeaturePropertyType getFeatureProperty(String name) {
if (name == null) {
return null;
}
return getFeatureProperties().stream().filter(p -> name.equals(p.name)).findFirst().orElse(null);
}

Expand Down

0 comments on commit 6600cf4

Please sign in to comment.