JDBCRoleService may cause NPE for roles without properties

Description

The following method throws NPE if "propName" is NULL

public GeoServerRole getRoleByName(String role)
throws IOException {
...
while (rs2.next()) {
String propName = rs2.getString(1);
Object propValue = rs2.getObject(2);
roleObject.getProperties().put(propName, propValue==null ? "" : propValue );
...

This happens if a service returns roles without properties.

We should add a check on "propName != null"

Environment

None

Status

Assignee

Alessio Fabiani

Reporter

Alessio Fabiani

Triage

Fix versions

Affects versions

None

Components

Priority

High
Configure