WW-3731 Uses import to reduce noise in code
Project: http://git-wip-us.apache.org/repos/asf/struts/repo Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/bdb3b2ec Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/bdb3b2ec Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/bdb3b2ec Branch: refs/heads/master Commit: bdb3b2ec24eeb60fc6bcdc7037918934d05ced55 Parents: a35a9a8 Author: Lukasz Lenart <lukaszlen...@apache.org> Authored: Tue Jan 12 08:11:08 2016 +0100 Committer: Lukasz Lenart <lukasz.len...@gmail.com> Committed: Tue Jan 19 16:18:01 2016 +0100 ---------------------------------------------------------------------- .../com/opensymphony/xwork2/util/AnnotationUtils.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/struts/blob/bdb3b2ec/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java b/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java index 2144bc8..ef0ee53 100644 --- a/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java +++ b/core/src/main/java/com/opensymphony/xwork2/util/AnnotationUtils.java @@ -15,6 +15,8 @@ */ package com.opensymphony.xwork2.util; +import org.apache.commons.lang3.ArrayUtils; + import java.lang.annotation.Annotation; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Field; @@ -42,8 +44,6 @@ public class AnnotationUtils { private static final Pattern SETTER_PATTERN = Pattern.compile("set([A-Z][A-Za-z0-9]*)$"); private static final Pattern GETTER_PATTERN = Pattern.compile("(get|is|has)([A-Z][A-Za-z0-9]*)$"); - - /** * Adds all fields with the specified Annotation of class clazz and its superclasses to allFields * @@ -122,9 +122,9 @@ public class AnnotationUtils { Collection<Method> toReturn = new HashSet<>(); for (Method m : clazz.getMethods()) { - if (org.apache.commons.lang3.ArrayUtils.isNotEmpty(annotation) && isAnnotatedBy(m, annotation)) { + if (ArrayUtils.isNotEmpty(annotation) && isAnnotatedBy(m, annotation)) { toReturn.add(m); - } else if (org.apache.commons.lang3.ArrayUtils.isEmpty(annotation) && org.apache.commons.lang3.ArrayUtils.isNotEmpty(m.getAnnotations())) { + } else if (ArrayUtils.isEmpty(annotation) && ArrayUtils.isNotEmpty(m.getAnnotations())) { toReturn.add(m); } } @@ -140,7 +140,7 @@ public class AnnotationUtils { * @see AnnotatedElement */ public static boolean isAnnotatedBy(AnnotatedElement annotatedElement, Class<? extends Annotation>... annotation) { - if (org.apache.commons.lang3.ArrayUtils.isEmpty(annotation)) { + if (ArrayUtils.isEmpty(annotation)) { return false; }