spring-projects / spring-projects/spring-security
Make RegisteredClient.Builder methods @Nullable for @Nullable properties
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
Expected Behavior
RegisteredClient.Builder has various @Nullable properties - id, clientId, clientSecret, etc. and can be initialised from an existing RegisteredClient. The fluent setters for these properties should also have @Nullable parameters.
Current Behavior
Passing null to these methods has no ill-effect, but analysis tools flag it as an error.
Context
When constructing a client from input data you want to be able to use the fluent interface, and not add null checks around every method to avoid calling it.
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 at RegisteredClient.Builder and identify the fluent setters for the nullable properties listed in the issue, including id, clientId, and clientSecret. Check the existing nullability annotations and relevant tests or static-analysis configuration, then confirm that passing null is accepted without analysis warnings and that the builder behavior remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- security
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 72/100