spring-projects / spring-projects/spring-hateoas
Prevent accidental non-anonymous use of `TypeReferences`
Open
@odrotbohm is already working on this.
Since Apr 29, 2026.
- Dominant language
- Java
- Stars
- 1.1k
- Forks
- 476
- PR merge metrics
- No merged PRs in 30d
Description
TypeReferences offers shortcuts for ParameterizedTypeReference instances typed to our common representation model subtypes to shorten the declaration. That said, to be able to fully analyze the generics, even these shortened invocations need to make use of an anonymous type. Otherwise the type resolution fails silently.
During the type resolution, we could detect that the class we inspect is not an anonymous type and reject it.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.