Skip to content

Statically prohibit missing format parameters in Druid's exception classes #8333

@leventov

Description

@leventov

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions