uber / uber/NullAway

[FR] Some way to have `@RequestParam(required = false)` be interpreted as `@Nullable`

Open
#751 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.1k
Forks
370
Avg merge
1d 13h
Merged PRs (30d)
68

Description

I just added NullAway 0.10.10 to the build process of a collection of microservices that use Spring Boot and Feign to communicate. The interfaces that the microservices use are annotated to indicate whether the function parameters are put in the URL path , as query parameters, or as a request body. Most query parameters are optional and should be treated as nullable if they have the required = false argument to the @RequestParam annotation. Unfortunately, required = true is the default and there are many other arguments that the annotation takes.

In my case, it seems like treating the @RequestParam annotation as equivalent to @Nullable makes some sense because we use required = false 99% of the time, but I can imagine other times where the extra accuracy would be helpful.

Contributor guide

Open the contributing guide

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.

Research direction

The issue names no files, tests, or entry points. Start by identifying where NullAway interprets annotations, then establish how @RequestParam(required = false) should be represented as nullable and how that behavior will be verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring-boot
Domain
tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.