Skip to content

Commit

Permalink
ogcapi-images: Avoid ServiceException in WFS GetCapabilities
Browse files Browse the repository at this point in the history
`STACItemFeaturesResponse.getCapabilitiesElementName()` throws
an `UnsupportedOperationException` instead of returning `null`,
producing a `ServiceExceptionReport` when requesting a WFS 1.0.0
`GetCapabilities` document.

`null` is a valid return value for this method, that results
in `WFSGetFeatureOutputFormat.getCapabilitiesElementNames()`
not contributing an output format name for the
`WFSGetFeatureOutputFormat` in question.
  • Loading branch information
groldan committed Jul 7, 2022
1 parent 1d32982 commit 5095e28
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,15 @@ protected void writeCollectionBounds(
// not needed in WFS3
}

/** capabilities output format string. */
/**
* {@inheritDoc}
*
* @return {@code null}, making {@link WFSGetFeatureOutputFormat#getCapabilitiesElementNames()}
* not contributing a result format on the GetCapabilities document for this output format.
*/
@Override
public String getCapabilitiesElementName() {
throw new UnsupportedOperationException();
return null;
}

@Override
Expand Down

0 comments on commit 5095e28

Please sign in to comment.