You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2020/05/24 23:35:05 UTC

[groovy] branch master updated: Sonar: Replace the type specification in this constructor call with the diamond operator ("<>")

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new aa398d5  Sonar: Replace the type specification in this constructor call with the diamond operator ("<>")
aa398d5 is described below

commit aa398d570f7680b1b9ed413ca4fb8e5e97919d02
Author: Mariusz W <ma...@gmail.com>
AuthorDate: Sun May 24 17:27:02 2020 +0200

    Sonar: Replace the type specification in this constructor call with the diamond operator ("<>")
---
 src/main/java/org/codehaus/groovy/syntax/ASTHelper.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/main/java/org/codehaus/groovy/syntax/ASTHelper.java b/src/main/java/org/codehaus/groovy/syntax/ASTHelper.java
index 978fba6..16da226 100644
--- a/src/main/java/org/codehaus/groovy/syntax/ASTHelper.java
+++ b/src/main/java/org/codehaus/groovy/syntax/ASTHelper.java
@@ -62,7 +62,7 @@ public class ASTHelper {
     }
 
     public void setPackageName(String packageName) {
-        setPackage(packageName, new ArrayList<AnnotationNode>());
+        setPackage(packageName, new ArrayList<>());
     }
 
     public PackageNode setPackage(String packageName, List<AnnotationNode> annotations) {
@@ -121,7 +121,7 @@ public class ASTHelper {
     }
 
     protected void addImport(ClassNode type, String name, String aliasName) {
-        addImport(type, name, aliasName, new ArrayList<AnnotationNode>());
+        addImport(type, name, aliasName, new ArrayList<>());
     }
 
     protected void addImport(ClassNode type, String name, String aliasName, List<AnnotationNode> annotations) {
@@ -130,7 +130,7 @@ public class ASTHelper {
     }
 
     protected void addStaticImport(ClassNode type, String name, String alias) {
-        addStaticImport(type, name, alias, new ArrayList<AnnotationNode>());
+        addStaticImport(type, name, alias, new ArrayList<>());
     }
 
     protected void addStaticImport(ClassNode type, String name, String alias, List<AnnotationNode> annotations) {
@@ -139,7 +139,7 @@ public class ASTHelper {
     }
 
     protected void addStaticStarImport(ClassNode type, String importClass) {
-        addStaticStarImport(type, importClass, new ArrayList<AnnotationNode>());
+        addStaticStarImport(type, importClass, new ArrayList<>());
     }
 
     protected void addStaticStarImport(ClassNode type, String importClass, List<AnnotationNode> annotations) {
@@ -147,7 +147,7 @@ public class ASTHelper {
     }
 
     protected void addStarImport(String importPackage) {
-        addStarImport(importPackage, new ArrayList<AnnotationNode>());
+        addStarImport(importPackage, new ArrayList<>());
     }
 
     protected void addStarImport(String importPackage, List<AnnotationNode> annotations) {