apache / apache/druid

@Nullable after @JsonProperty

Open
#8,268 0 comments 0 reactions 0 assignees View on GitHub
Area - Automation/Static Analysis Contributions Welcome
Dominant language
Java
Stars
14.1k
Forks
3.8k
Avg merge
2d 58m
Merged PRs (30d)
233

Description

A Checkstyle's Regex rule could be added to avoid putting `@Nullable` before `@JsonProperty`, like `@Nullable @JsonProperty("foo") Foo foo`.

Putting `@Nullable` immediately before the type of the variable is more semantic because `@Nullable Foo` is an "extended type" of a variable.

From [here](https://github.com/apache/incubator-druid/pull/8209#discussion_r311674741).

Contributor guide

Open the contributing guide

Research direction

No file or test is named. Start by locating Druid's Checkstyle configuration and existing Regex rules, then verify how the example declaration is matched. Done means the configuration rejects @Nullable before @JsonProperty while allowing the semantic placement immediately before the variable type.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.