Merge branch '3.1.x'

Closes gh-36238
This commit is contained in:
Andy Wilkinson
2023-07-05 09:51:35 +01:00
11 changed files with 28 additions and 36 deletions

View File

@@ -50,7 +50,7 @@ class ArtifactCollector {
Collection<DeployableArtifact> collectArtifacts(Path root) {
try (Stream<Path> artifacts = Files.walk(root)) {
return artifacts.filter(Files::isRegularFile).filter(this.excludeFilter)
.map((artifact) -> deployableArtifact(artifact, root)).collect(Collectors.toList());
.map((artifact) -> deployableArtifact(artifact, root)).toList();
}
catch (IOException ex) {
throw new RuntimeException("Could not read artifacts from '" + root + "'");

View File

@@ -208,7 +208,7 @@ public class SonatypeService {
List<String> failureMessages = Stream.of(activities).flatMap((activity) -> activity.events.stream())
.filter((event) -> event.severity > 0).flatMap((event) -> event.properties.stream())
.filter((property) -> "failureMessage".equals(property.name))
.map((property) -> " " + property.value).collect(Collectors.toList());
.map((property) -> " " + property.value).toList();
if (failureMessages.isEmpty()) {
logger.error("Close failed for unknown reasons");
}