You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2022/09/15 06:13:10 UTC
[groovy] 02/02: use diamond operator
This is an automated email from the ASF dual-hosted git repository.
paulk pushed a commit to branch GROOVY_3_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
commit cc794435ae33b9129e20b7548813853746b03298
Author: Paul King <pa...@asert.com.au>
AuthorDate: Thu Sep 15 16:12:54 2022 +1000
use diamond operator
---
.../src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java b/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
index f039550481..0c4a110272 100644
--- a/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
+++ b/subprojects/groovy-nio/src/main/java/org/codehaus/groovy/runtime/NioGroovyMethods.java
@@ -1121,7 +1121,7 @@ public class NioGroovyMethods extends DefaultGroovyMethodsSupport {
@Deprecated
public static void traverse(final Path self, @ClosureParams(value = SimpleType.class, options = "java.nio.file.Path") final Closure closure)
throws IOException {
- traverse(self, new HashMap<String, Object>(), closure);
+ traverse(self, new HashMap<>(), closure);
}
/**
@@ -1158,7 +1158,7 @@ public class NioGroovyMethods extends DefaultGroovyMethodsSupport {
try (DirectoryStream<Path> stream = Files.newDirectoryStream(self)) {
final Iterator<Path> itr = stream.iterator();
- List<Path> files = new LinkedList<Path>();
+ List<Path> files = new LinkedList<>();
while (itr.hasNext()) {
files.add(itr.next());
}