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 2023/08/16 12:57:28 UTC
[groovy] branch master updated: minor style issues
This is an automated email from the ASF dual-hosted git repository.
paulk 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 eb738ea24f minor style issues
eb738ea24f is described below
commit eb738ea24f6a36149d520d3e3d8af4c13c4fe6ae
Author: Paul King <pa...@asert.com.au>
AuthorDate: Wed Aug 16 22:57:15 2023 +1000
minor style issues
---
src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java b/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java
index ee4badd5fc..9ddf976a51 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/BeanUtils.java
@@ -35,6 +35,8 @@ import static org.apache.groovy.util.BeanUtils.decapitalize;
import static org.codehaus.groovy.ast.ClassHelper.isPrimitiveBoolean;
public class BeanUtils {
+ private BeanUtils() {}
+
static final String GET_PREFIX = "get";
static final String SET_PREFIX = "set";
static final String IS_PREFIX = "is";
@@ -65,15 +67,15 @@ public class BeanUtils {
* @return the list of found property nodes
*/
public static List<PropertyNode> getAllProperties(ClassNode type, boolean includeSuperProperties, boolean includeStatic, boolean includePseudoGetters, boolean includePseudoSetters, boolean superFirst) {
- return getAllProperties(type, type, new HashSet<String>(), includeSuperProperties, includeStatic, includePseudoGetters, includePseudoSetters, superFirst);
+ return getAllProperties(type, type, new HashSet<>(), includeSuperProperties, includeStatic, includePseudoGetters, includePseudoSetters, superFirst);
}
private static List<PropertyNode> getAllProperties(ClassNode origType, ClassNode type, Set<String> names, boolean includeSuperProperties, boolean includeStatic, boolean includePseudoGetters, boolean includePseudoSetters, boolean superFirst) {
// TODO add generics support so this can be used for @EAHC
if (type == null) {
- return new ArrayList<PropertyNode>();
+ return new ArrayList<>();
}
- List<PropertyNode> result = new ArrayList<PropertyNode>();
+ List<PropertyNode> result = new ArrayList<>();
if (superFirst && includeSuperProperties) {
result.addAll(getAllProperties(origType, type.getSuperClass(), names, includeSuperProperties, includeStatic, includePseudoGetters, includePseudoSetters, superFirst));
}