Skip to content

Conversation

@jcflack
Copy link
Contributor

@jcflack jcflack commented May 28, 2025

The comparator could return a premature result if one Snippet or both being compared has a null implementor name, resulting in an output ordering that could depend on the sequence of comparisons performed. While it would still reflect the dependency graph and thus work, it would frustrate reproducible-build expectations.

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 convincing by taking advantage of the Java 8 additions to Comparator.

Addresses #527.

For consistency's sake, also Comparator-ize TypeTiebreaker.

The comparator could return a premature result if one Snippet or both
being compared has a null implementor name, resulting in an output
ordering that could depend 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 convincing
by taking advantage of the Java 8 additions to Comparator.

Addresses #527.

For consistency's sake, also Comparator-ize TypeTiebreaker.
@jcflack jcflack merged commit bb36661 into REL1_6_STABLE May 29, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants