spring-projects / spring-projects/spring-hateoas

Prevent accidental non-anonymous use of `TypeReferences`

Open
#2,483 0 comments 0 reactions 1 assignee View on GitHub

@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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.