You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by lu...@apache.org on 2016/01/12 08:11:27 UTC

struts git commit: WW-3731 Uses import to reduce noise in code

Repository: struts
Updated Branches:
  refs/heads/master 61a7ee296 -> 460faa33d


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/460faa33
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/460faa33
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/460faa33

Branch: refs/heads/master
Commit: 460faa33d8e87b8adcfd81cc69299553c719f23a
Parents: 61a7ee2
Author: Lukasz Lenart <lu...@apache.org>
Authored: Tue Jan 12 08:11:08 2016 +0100
Committer: Lukasz Lenart <lu...@apache.org>
Committed: Tue Jan 12 08:11:08 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/460faa33/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;
         }