Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix input snapshotting error when using test clusters cliSetup #52340

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,23 @@ public List<T> subList(int fromIndex, int toIndex) {
}

@Override
public List<? extends Object> getNormalizedCollection() {
public List<? extends PropertyListEntry<T>> getNormalizedCollection() {
return delegate.stream()
.peek(this::validate)
.filter(entry -> entry.getNormalization() != PropertyNormalization.IGNORE_VALUE)
.collect(Collectors.toList());
}

/**
* Return a "flattened" collection. This should be used when the collection type is itself a complex type with properties
* annotated as Gradle inputs rather than a simple type like {@link String}.
*
* @return a flattened collection filtered according to normalization strategy
*/
public List<? extends T> getFlatNormalizedCollection() {
return getNormalizedCollection().stream().map(PropertyListEntry::getValue).collect(Collectors.toList());
}

private void validate(PropertyListEntry<T> entry) {
assertNotNull(entry.getValue(), "entry");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ public List<?> getKeystoreFiles() {

@Nested
public List<?> getCliSetup() {
return cliSetup.getNormalizedCollection();
return cliSetup.getFlatNormalizedCollection();
}

@Nested
Expand Down