diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-04 22:42:13 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-12-04 22:42:13 +0100 |
commit | fd54b4e4b136b05b67b471dca3ca6ce3dd116710 (patch) | |
tree | 88ab77cc41620eb2b8639b10b7edd1e57b901f12 /bundle-plugin | |
parent | fae49834f53500587921196e86ee4af4c670d8c9 (diff) |
Revert collect(Collectors.toList())
Diffstat (limited to 'bundle-plugin')
2 files changed, 5 insertions, 5 deletions
diff --git a/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/AbstractGenerateOsgiManifestMojo.java b/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/AbstractGenerateOsgiManifestMojo.java index 00c915b8b91..e058e0dfa6f 100644 --- a/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/AbstractGenerateOsgiManifestMojo.java +++ b/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/AbstractGenerateOsgiManifestMojo.java @@ -138,7 +138,7 @@ abstract class AbstractGenerateOsgiManifestMojo extends AbstractMojo { private Collection<String> osgiExportPackages(Map<String, ExportPackageAnnotation> exportedPackages) { return exportedPackages.entrySet().stream().map(entry -> entry.getKey() + ";version=" + entry.getValue().osgiVersion()) - .toList(); + .collect(Collectors.toList()); } private static String asOsgiImport(String packageName, Optional<String> version) { @@ -189,7 +189,7 @@ abstract class AbstractGenerateOsgiManifestMojo extends AbstractMojo { } else if (parameters.size() == 0) { return Optional.empty(); } else { - List<String> paramNames = parameters.stream().map(ExportPackages.Parameter::getName).toList(); + List<String> paramNames = parameters.stream().map(ExportPackages.Parameter::getName).collect(Collectors.toList()); throw new RuntimeException("A single, optional version parameter expected, but got " + paramNames); } } diff --git a/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java b/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java index f5d3259c537..7e5ba3d91ce 100644 --- a/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java +++ b/bundle-plugin/src/main/java/com/yahoo/container/plugin/mojo/GenerateOsgiManifestMojo.java @@ -70,7 +70,7 @@ public class GenerateOsgiManifestMojo extends AbstractGenerateOsgiManifestMojo { throwIfInternalContainerArtifactsAreIncluded(artifactSet.getJarArtifactsToInclude()); List<Export> exportedPackagesFromProvidedJars = exportedPackagesAggregated( - artifactSet.getJarArtifactsProvided().stream().map(Artifact::getFile).toList()); + artifactSet.getJarArtifactsProvided().stream().map(Artifact::getFile).collect(Collectors.toList())); // Packages from Export-Package headers in provided scoped jars Set<String> exportedPackagesFromProvidedDeps = ExportPackages.packageNames(exportedPackagesFromProvidedJars); @@ -182,7 +182,7 @@ public class GenerateOsgiManifestMojo extends AbstractGenerateOsgiManifestMojo { private void warnOnUnsupportedArtifacts(Collection<Artifact> nonJarArtifacts) { List<Artifact> unsupportedArtifacts = nonJarArtifacts.stream().filter(a -> ! a.getType().equals("pom")) - .toList(); + .collect(Collectors.toList()); unsupportedArtifacts.forEach(artifact -> getLog() .warn(String.format("Unsupported artifact '%s': Type '%s' is not supported. Please file a feature request.", @@ -215,7 +215,7 @@ public class GenerateOsgiManifestMojo extends AbstractGenerateOsgiManifestMojo { List<ClassFileMetaData> analyzedClasses = allDescendantFiles(outputDirectory) .filter(file -> file.getName().endsWith(".class")) .map(classFile -> Analyze.analyzeClass(classFile, artifactVersionOrNull(bundleVersion))) - .toList(); + .collect(Collectors.toList()); return PackageTally.fromAnalyzedClassFiles(analyzedClasses); } |