Generics usage needs to be stricter to make the Java9 compiler happy

Description

When using Java 9, the following code doesn't compile:

Environment

None

Assignee

Sanne Grinovero

Reporter

Sanne Grinovero

Labels

None

Suitable for new contributors

None

Pull Request

None

Feedback Requested

None

Components

Fix versions

Priority

Minor
Configure