| @@ -900,7 +900,7 @@ public class Main implements AntMain { | |||||
| // Setting it here allows top-level tasks to access the | // Setting it here allows top-level tasks to access the | ||||
| // property. | // property. | ||||
| project.setUserProperty(MagicNames.PROJECT_INVOKED_TARGETS, | project.setUserProperty(MagicNames.PROJECT_INVOKED_TARGETS, | ||||
| targets.stream().collect(Collectors.joining(","))); | |||||
| String.join(",", targets)); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -1247,7 +1247,7 @@ public class Project implements ResourceFactory { | |||||
| */ | */ | ||||
| public void executeTargets(final Vector<String> names) throws BuildException { | public void executeTargets(final Vector<String> names) throws BuildException { | ||||
| setUserProperty(MagicNames.PROJECT_INVOKED_TARGETS, | setUserProperty(MagicNames.PROJECT_INVOKED_TARGETS, | ||||
| names.stream().collect(Collectors.joining(","))); | |||||
| String.join(",", names)); | |||||
| getExecutor().executeTargets(this, names.toArray(new String[names.size()])); | getExecutor().executeTargets(this, names.toArray(new String[names.size()])); | ||||
| } | } | ||||
| @@ -22,7 +22,6 @@ import java.util.Enumeration; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Vector; | import java.util.Vector; | ||||
| import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||
| import java.util.stream.Stream; | |||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.Task; | import org.apache.tools.ant.Task; | ||||
| @@ -128,8 +127,7 @@ public class GenerateKey extends Task { | |||||
| * @return the encoded value. | * @return the encoded value. | ||||
| */ | */ | ||||
| public String encode(final String string) { | public String encode(final String string) { | ||||
| return Stream.of(string.split(",")) | |||||
| .collect(Collectors.joining("\\,")); | |||||
| return String.join("\\,", string.split(",")); | |||||
| } | } | ||||
| } | } | ||||
| @@ -35,7 +35,6 @@ import java.util.Locale; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| import java.util.Objects; | import java.util.Objects; | ||||
| import java.util.Vector; | import java.util.Vector; | ||||
| import java.util.stream.Collectors; | |||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.util.FileUtils; | import org.apache.tools.ant.util.FileUtils; | ||||
| @@ -264,7 +263,7 @@ public class Manifest { | |||||
| */ | */ | ||||
| public String getValue() { | public String getValue() { | ||||
| return values.isEmpty() ? null | return values.isEmpty() ? null | ||||
| : values.stream().collect(Collectors.joining(" ")); | |||||
| : String.join(" ", values); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -29,7 +29,6 @@ import java.nio.file.Files; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.StringTokenizer; | import java.util.StringTokenizer; | ||||
| import java.util.stream.Collectors; | |||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.Project; | import org.apache.tools.ant.Project; | ||||
| @@ -422,7 +421,7 @@ public class CvsTagDiff extends AbstractCvsTask { | |||||
| root.setAttribute("cvsroot", getCvsRoot()); | root.setAttribute("cvsroot", getCvsRoot()); | ||||
| root.setAttribute("package", | root.setAttribute("package", | ||||
| packageNames.stream().collect(Collectors.joining(","))); | |||||
| String.join(",", packageNames)); | |||||
| DOM_WRITER.openElement(root, writer, 0, "\t"); | DOM_WRITER.openElement(root, writer, 0, "\t"); | ||||
| writer.println(); | writer.println(); | ||||
| for (CvsTagEntry entry : entries) { | for (CvsTagEntry entry : entries) { | ||||
| @@ -35,7 +35,6 @@ import java.util.List; | |||||
| import java.util.Map; | import java.util.Map; | ||||
| import java.util.Properties; | import java.util.Properties; | ||||
| import java.util.StringTokenizer; | import java.util.StringTokenizer; | ||||
| import java.util.stream.Collectors; | |||||
| import java.util.stream.Stream; | import java.util.stream.Stream; | ||||
| import javax.xml.parsers.SAXParser; | import javax.xml.parsers.SAXParser; | ||||
| @@ -404,7 +403,7 @@ public class IPlanetEjbc { | |||||
| command += "ejbc "; | command += "ejbc "; | ||||
| /* Concatenate all of the command line arguments into a single String */ | /* Concatenate all of the command line arguments into a single String */ | ||||
| String args = Stream.of(arguments).collect(Collectors.joining(" ")); | |||||
| String args = String.join(" ", arguments); | |||||
| log(command + args); | log(command + args); | ||||
| @@ -20,8 +20,6 @@ package org.apache.tools.ant.taskdefs.optional.extension; | |||||
| import java.io.File; | import java.io.File; | ||||
| import java.text.ParseException; | import java.text.ParseException; | ||||
| import java.util.jar.Manifest; | import java.util.jar.Manifest; | ||||
| import java.util.stream.Collectors; | |||||
| import java.util.stream.Stream; | |||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| @@ -138,7 +136,7 @@ class LibraryDisplayer { | |||||
| if (null != sections) { | if (null != sections) { | ||||
| System.out.print("Sections: "); | System.out.print("Sections: "); | ||||
| System.out | System.out | ||||
| .println(Stream.of(sections).collect(Collectors.joining(" "))); | |||||
| .println(String.join(" ", sections)); | |||||
| } | } | ||||
| System.out.println(specification.toString()); | System.out.println(specification.toString()); | ||||
| } | } | ||||
| @@ -23,7 +23,6 @@ import java.io.IOException; | |||||
| import java.util.ArrayList; | import java.util.ArrayList; | ||||
| import java.util.LinkedList; | import java.util.LinkedList; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.stream.Collectors; | |||||
| import java.util.stream.Stream; | import java.util.stream.Stream; | ||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| @@ -551,7 +550,7 @@ public class Scp extends SSHBase { | |||||
| private BuildException exactlyOne(final String[] attrs, final String alt) { | private BuildException exactlyOne(final String[] attrs, final String alt) { | ||||
| return new BuildException("Exactly one of [%s]%s is required", | return new BuildException("Exactly one of [%s]%s is required", | ||||
| Stream.of(attrs).collect(Collectors.joining("|")), | |||||
| String.join("|", attrs), | |||||
| alt == null ? "" : " or " + alt); | alt == null ? "" : " or " + alt); | ||||
| } | } | ||||
| } | } | ||||
| @@ -24,7 +24,6 @@ import java.util.Enumeration; | |||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Stack; | import java.util.Stack; | ||||
| import java.util.stream.Collectors; | import java.util.stream.Collectors; | ||||
| import java.util.stream.Stream; | |||||
| import org.apache.tools.ant.BuildException; | import org.apache.tools.ant.BuildException; | ||||
| import org.apache.tools.ant.DirectoryScanner; | import org.apache.tools.ant.DirectoryScanner; | ||||
| @@ -903,7 +902,7 @@ public abstract class AbstractFileSet extends DataType | |||||
| } | } | ||||
| dieOnCircularReference(); | dieOnCircularReference(); | ||||
| DirectoryScanner ds = getDirectoryScanner(getProject()); | DirectoryScanner ds = getDirectoryScanner(getProject()); | ||||
| return Stream.of(ds.getIncludedFiles()).collect(Collectors.joining(";")); | |||||
| return String.join(";", ds.getIncludedFiles()); | |||||
| } | } | ||||
| /** | /** | ||||
| @@ -19,8 +19,6 @@ | |||||
| package org.apache.tools.ant.types; | package org.apache.tools.ant.types; | ||||
| import java.util.Iterator; | import java.util.Iterator; | ||||
| import java.util.stream.Collectors; | |||||
| import java.util.stream.Stream; | |||||
| import org.apache.tools.ant.DirectoryScanner; | import org.apache.tools.ant.DirectoryScanner; | ||||
| import org.apache.tools.ant.types.resources.FileResourceIterator; | import org.apache.tools.ant.types.resources.FileResourceIterator; | ||||
| @@ -105,8 +103,7 @@ public class DirSet extends AbstractFileSet implements ResourceCollection { | |||||
| */ | */ | ||||
| @Override | @Override | ||||
| public String toString() { | public String toString() { | ||||
| DirectoryScanner ds = getDirectoryScanner(getProject()); | |||||
| return Stream.of(ds.getIncludedDirectories()).collect(Collectors.joining(";")); | |||||
| return String.join(";", getDirectoryScanner(getProject()).getIncludedDirectories()); | |||||
| } | } | ||||
| } | } | ||||
| @@ -35,7 +35,6 @@ import java.net.Socket; | |||||
| import java.util.LinkedHashMap; | import java.util.LinkedHashMap; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| import java.util.Vector; | import java.util.Vector; | ||||
| import java.util.stream.Collectors; | |||||
| /** | /** | ||||
| * A class to help send SMTP email. | * A class to help send SMTP email. | ||||
| @@ -312,7 +311,7 @@ public class MailMessage { | |||||
| } | } | ||||
| String vectorToList(Vector<String> v) { | String vectorToList(Vector<String> v) { | ||||
| return v.stream().collect(Collectors.joining(", ")); | |||||
| return String.join(", ", v); | |||||
| } | } | ||||
| void flushHeaders() throws IOException { | void flushHeaders() throws IOException { | ||||
| @@ -23,9 +23,6 @@ import org.apache.tools.ant.Task; | |||||
| import org.apache.tools.ant.types.Mapper; | import org.apache.tools.ant.types.Mapper; | ||||
| import org.apache.tools.ant.util.FileNameMapper; | import org.apache.tools.ant.util.FileNameMapper; | ||||
| import java.util.Arrays; | |||||
| import java.util.stream.Collectors; | |||||
| /** | /** | ||||
| * This is a test task to show the result of a mapper | * This is a test task to show the result of a mapper | ||||
| * on a specific input. | * on a specific input. | ||||
| @@ -83,7 +80,7 @@ public class MapperResult extends Task { | |||||
| if (result == null) { | if (result == null) { | ||||
| flattened = NULL_MAPPER_RESULT; | flattened = NULL_MAPPER_RESULT; | ||||
| } else { | } else { | ||||
| flattened = Arrays.stream(result).collect(Collectors.joining("|")); | |||||
| flattened = String.join("|", result); | |||||
| } | } | ||||
| if (!flattened.equals(output)) { | if (!flattened.equals(output)) { | ||||
| throw new BuildException(failMessage + " got " + flattened + " expected " + output); | throw new BuildException(failMessage + " got " + flattened + " expected " + output); | ||||