NPE in Monitor (core) extension

Description

Monitoring extension logs a NullPointerException when the following URL is hit:

http://localhost:8080/geoserver/rest/

Notice the "/" on the end.
Without the slash, no error is logged:

http://localhost:8080/geoserver/rest

Other REST URLs do not suffer from this issue, for example "http://localhost:8080/geoserver/rest/resource/" works correctly

If the audit file is enabled, all the requests (even the one causing the NPE) are logged in the audit log file.

Here is the log:

To reproduce:

Expected result:

  • The "Geoserver Configuration API" page

Actual result:

  • "-1" and an error in the log

Environment

None

Assignee

Unassigned

Reporter

lorenzo.pini

Triage

None

Fix versions

None

Affects versions

Components

Priority

Medium
Configure