spring-projects / spring-projects/spring-ai
Enforce Maven build failure when a Java preview feature is used
Open
Nobody has claimed this yet.
status: waiting-for-triage
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
As a contributor using primarily Java 21 on a daily basis, I would like the Maven build to fail if a preview feature from Java 17 (e.g., Pattern Matching for Switch) is used.
Contributor guide
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.
Research direction
Start by locating the repository's Maven build and Java compiler configuration, then review how Java 21 compilation is currently configured. Verify the behavior with a Java 17 preview example such as Pattern Matching for Switch. Done means the Maven build rejects preview-feature usage while preserving normal Java 21 builds.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100