Skip to content

YamlCommentFormatter has faulty null check #83

@Ontey6

Description

@Ontey6

In org.simpleyaml.configuration.comments.format.YamlCommentFormatter's first constructor, There are two nullity checks using Validate.notNull, but they both check the same object:

public YamlCommentFormatter(final YamlCommentFormatterConfiguration blockFormatter, final YamlSideCommentFormatterConfiguration sideFormatter) {
   Validate.notNull(blockFormatter, "blockFormatter configuration cannot be null!");
>  Validate.notNull(blockFormatter, "sideFormatter configuration cannot be null!");
   this.blockFormatter = blockFormatter;
   this.sideFormatter = sideFormatter;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions