Statically prohibit missing format parameters in Druid's exception classes
- Dominant language
- Java
- Stars
- 14.1k
- Forks
- 3.8k
- Avg merge
- 2d 58m
- Merged PRs (30d)
- 233
Description
https://youtrack.jetbrains.com/issue/IDEA-175327 doesn't allow to prevent bugs like fixed in #8331 using IntelliJ's "Malformed format string" inspection. However, there is a simple workaround: make constructors in all Druid's exception classes like `RE`, `ISE`, `IAE`, etc. private, expose static factory methods (e. g. `RE.of()`), and put them into the MalformedFormatString inspection config.
This would be a follow-up of #4474.
Contributor guide
Research direction
Start by reviewing follow-up issue #4474 and the RE, ISE, IAE, and other Druid exception classes. Determine the full set of constructors and the IntelliJ MalformedFormatString inspection configuration that must change. Done means constructors are private, static factories such as RE.of() are exposed, and missing format parameters are statically rejected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100