Skip to content

Conversation

Pankraz76
Copy link
Contributor

No description provided.

@Pankraz76 Pankraz76 force-pushed the fin-api-fix-pr-fix-CodeCleanup branch from a77fe9f to 1fea8d4 Compare October 2, 2025 12:22
@Pankraz76 Pankraz76 marked this pull request as ready for review October 2, 2025 12:23
Copy link
Member

@nedtwigg nedtwigg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

State(JarState jarState, @Nullable File configFile) throws IOException {
this.jarState = jarState;
this.configSignature = FileSignature.signAsList(configFile == null ? Collections.emptySet() : Collections.singleton(configFile));
this.configSignature = FileSignature.signAsList(configFile == null ? Collections.emptySet() : Set.of(configFile));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised that Collections.emptySet() doesn't have a Set.empty() or something. 🤷

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does have an equivalent to emptySet(), actually. Just call Set.of()without any arguments.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i thought so! interesting that the rule replaces Collections.singleton but not Collections.emptySet

@nedtwigg nedtwigg merged commit f3c82b3 into diffplug:main Oct 3, 2025
20 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.

3 participants