Thanks to visit codestin.com
Credit goes to github.com

Skip to content

SQL generator may use non-reproducible order in rare cases #527

@jcflack

Description

@jcflack

The SnippetTiebreaker comparator can return a premature result if one Snippet or both being compared has a null implementor name, which can result in an output ordering that depends on the sequence of comparisons performed.

The case is unlikely to be seen in practice, as an implementor name can only be made null by explicit implementor="" in an annotation or -Addr.implementor=- when invoking the Java compiler.

Nonetheless, the tiebreaker method can be made more simple and obviously correct by taking advantage of the Java 8 additions to Comparator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions