WMSValidator should use attributes() instead of getAttributes()

Description

The WMSValidator, when trying to validate a FeatureInfo, looks for the geometry attribute binding through the getAttributes() method.

https://github.com/geoserver/geoserver/blob/bf0345d228111c15aeff6f7c1bc87b4ed230af96/src/wms/src/main/java/org/geoserver/wms/WMSValidator.java#L65

This may fail if the Resource has not been loaded and the configuration does not contain the type of the attributes.

In order to avoid this issue (which may cause an NPE) the WMSValidator should call the method attributes() instead.

Environment

None

Status

Assignee

Unassigned

Reporter

Alessio Fabiani

Triage

None

Fix versions

Affects versions

None

Priority

Medium
Configure