Replace Lambda with method reference.master
| @@ -17,6 +17,7 @@ | |||||
| */ | */ | ||||
| package org.apache.tools.ant.property; | package org.apache.tools.ant.property; | ||||
| import java.util.AbstractCollection; | |||||
| import java.util.Collections; | import java.util.Collections; | ||||
| import java.util.Deque; | import java.util.Deque; | ||||
| import java.util.HashSet; | import java.util.HashSet; | ||||
| @@ -159,8 +160,8 @@ public class LocalPropertyStack { | |||||
| */ | */ | ||||
| public Set<String> getPropertyNames() { | public Set<String> getPropertyNames() { | ||||
| final Set<String> names = stack.stream().map(Map::keySet) | final Set<String> names = stack.stream().map(Map::keySet) | ||||
| .collect(Collector.of(() -> new HashSet<String>(), | |||||
| (ns, ks) -> ns.addAll(ks), | |||||
| .collect(Collector.of(HashSet::new, | |||||
| AbstractCollection::addAll, | |||||
| (ns1, ns2) -> { ns1.addAll(ns2); return ns1; }, | (ns1, ns2) -> { ns1.addAll(ns2); return ns1; }, | ||||
| Collector.Characteristics.UNORDERED, Collector.Characteristics.IDENTITY_FINISH)); | Collector.Characteristics.UNORDERED, Collector.Characteristics.IDENTITY_FINISH)); | ||||
| return Collections.unmodifiableSet(names); | return Collections.unmodifiableSet(names); | ||||
| @@ -653,9 +653,8 @@ public class LauncherSupport { | |||||
| @Override | @Override | ||||
| public void executionStarted(final TestIdentifier testIdentifier) { | public void executionStarted(final TestIdentifier testIdentifier) { | ||||
| super.executionStarted(testIdentifier); | super.executionStarted(testIdentifier); | ||||
| AbstractJUnitResultFormatter.isTestClass(testIdentifier).ifPresent(testClass -> { | |||||
| this.originalSysOut.println("Running " + testClass.getClassName()); | |||||
| }); | |||||
| AbstractJUnitResultFormatter.isTestClass(testIdentifier).ifPresent(testClass -> | |||||
| this.originalSysOut.println("Running " + testClass.getClassName())); | |||||
| } | } | ||||
| @@ -146,11 +146,11 @@ public class StandaloneLauncher { | |||||
| } | } | ||||
| final String includeTags = reader.getAttributeValue(null, LD_XML_ATTR_INCLUDE_TAGS); | final String includeTags = reader.getAttributeValue(null, LD_XML_ATTR_INCLUDE_TAGS); | ||||
| if (includeTags != null) { | if (includeTags != null) { | ||||
| Stream.of(includeTags.split(",")).forEach(i -> forkedLaunch.addIncludeTag(i)); | |||||
| Stream.of(includeTags.split(",")).forEach(forkedLaunch::addIncludeTag); | |||||
| } | } | ||||
| final String excludeTags = reader.getAttributeValue(null, LD_XML_ATTR_EXCLUDE_TAGS); | final String excludeTags = reader.getAttributeValue(null, LD_XML_ATTR_EXCLUDE_TAGS); | ||||
| if (excludeTags != null) { | if (excludeTags != null) { | ||||
| Stream.of(excludeTags.split(",")).forEach(e -> forkedLaunch.addExcludeTag(e)); | |||||
| Stream.of(excludeTags.split(",")).forEach(forkedLaunch::addExcludeTag); | |||||
| } | } | ||||
| final String printSummary = reader.getAttributeValue(null, LD_XML_ATTR_PRINT_SUMMARY); | final String printSummary = reader.getAttributeValue(null, LD_XML_ATTR_PRINT_SUMMARY); | ||||
| if (printSummary != null) { | if (printSummary != null) { | ||||