Skip to content

GitHub Issue 954: Add error for duplicate values for parent inputs#7559

Open
XingY wants to merge 3 commits intodevelopfrom
fb_duplicateParents
Open

GitHub Issue 954: Add error for duplicate values for parent inputs#7559
XingY wants to merge 3 commits intodevelopfrom
fb_duplicateParents

Conversation

@XingY
Copy link
Copy Markdown
Contributor

@XingY XingY commented Apr 7, 2026

@XingY XingY requested a review from labkey-susanh April 8, 2026 22:24
{
List<String> valueList = values.toList();
Set<String> valueSet = new HashSet<>();
List<String> duplicates = valueList.stream().filter(s -> !valueSet.add(s)).toList();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The conversion from the stream to the list to the stream and then again to the stream is, uh, unfortunate and kind of defeats one of the purposes of using the stream. I would hope that we don't have a lot of values, of course, so maybe not a big deal (and I don't have a better suggestion).

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