Browse Source

Tidy up the code

master
Gintas Grigelionis 7 years ago
parent
commit
e6b2030060
3 changed files with 2 additions and 3 deletions
  1. +0
    -1
      src/main/org/apache/tools/ant/attribute/BaseIfAttribute.java
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Replace.java
  3. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java

+ 0
- 1
src/main/org/apache/tools/ant/attribute/BaseIfAttribute.java View File

@@ -18,7 +18,6 @@


package org.apache.tools.ant.attribute; package org.apache.tools.ant.attribute;


import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;




+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Replace.java View File

@@ -936,7 +936,7 @@ public class Replace extends MatchingTask {
*/ */
private Iterator<String> getOrderedIterator(Properties props) { private Iterator<String> getOrderedIterator(Properties props) {
List<String> keys = new ArrayList<>(props.stringPropertyNames()); List<String> keys = new ArrayList<>(props.stringPropertyNames());
keys.sort(Comparator.<String>comparingInt(String::length).reversed());
keys.sort(Comparator.comparingInt(String::length).reversed());
return keys.iterator(); return keys.iterator();
} }
} }

+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/optional/junit/FailureRecorder.java View File

@@ -150,7 +150,7 @@ public class FailureRecorder extends ProjectComponent implements JUnitResultForm
super.setProject(project); super.setProject(project);
// check if already registered // check if already registered
// register if needed // register if needed
if (!project.getBuildListeners().stream().anyMatch(FailureRecorder.class::isInstance)) {
if (project.getBuildListeners().stream().noneMatch(FailureRecorder.class::isInstance)) {
verbose("Register FailureRecorder (@" + this.hashCode() + ") as BuildListener"); verbose("Register FailureRecorder (@" + this.hashCode() + ") as BuildListener");
project.addBuildListener(this); project.addBuildListener(this);
} }


Loading…
Cancel
Save