struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nia...@apache.org
Subject svn commit: r560653 - /struts/struts1/trunk/core/src/main/java/org/apache/struts/util/RequestUtils.java
Date Sun, 29 Jul 2007 01:49:02 GMT
Author: niallp
Date: Sat Jul 28 18:49:01 2007
New Revision: 560653

URL: http://svn.apache.org/viewvc?view=rev&rev=560653
Log:
Style changes only - remove tabs, uses braces with if statement

Modified:
    struts/struts1/trunk/core/src/main/java/org/apache/struts/util/RequestUtils.java

Modified: struts/struts1/trunk/core/src/main/java/org/apache/struts/util/RequestUtils.java
URL: http://svn.apache.org/viewvc/struts/struts1/trunk/core/src/main/java/org/apache/struts/util/RequestUtils.java?view=diff&rev=560653&r1=560652&r2=560653
==============================================================================
--- struts/struts1/trunk/core/src/main/java/org/apache/struts/util/RequestUtils.java (original)
+++ struts/struts1/trunk/core/src/main/java/org/apache/struts/util/RequestUtils.java Sat Jul
28 18:49:01 2007
@@ -495,36 +495,38 @@
      * @throws ServletException if the introspection has any errors.
      */
     private static Object rationalizeMultipleFileProperty(Object bean, String name, Object
parameterValue) throws ServletException {
-    	if (!(parameterValue instanceof FormFile)) return parameterValue;
+        if (!(parameterValue instanceof FormFile)) {
+            return parameterValue;
+        }
 
-    	FormFile formFileValue = (FormFile) parameterValue;
-    	try {
-			Class propertyType = PropertyUtils.getPropertyType(bean, name);
-
-			if (propertyType.isAssignableFrom(List.class)) {
-				ArrayList list = new ArrayList(1);
-				list.add(formFileValue);
-				return list;
-			}
-
-			if (propertyType.isArray() && propertyType.getComponentType().equals(FormFile.class))
{
-				return new FormFile[] { formFileValue };
-			}
-
-    	} catch (IllegalAccessException e) {
-			throw new ServletException(e);
-		} catch (InvocationTargetException e) {
-			throw new ServletException(e);
-		} catch (NoSuchMethodException e) {
-			throw new ServletException(e);
-		}
-    	
-		// no changes
-    	return parameterValue;
-    	
-	}
+        FormFile formFileValue = (FormFile) parameterValue;
+        try {
+            Class propertyType = PropertyUtils.getPropertyType(bean, name);
 
-	/**
+            if (propertyType.isAssignableFrom(List.class)) {
+                ArrayList list = new ArrayList(1);
+                list.add(formFileValue);
+                return list;
+            }
+
+            if (propertyType.isArray() && propertyType.getComponentType().equals(FormFile.class))
{
+                return new FormFile[] { formFileValue };
+            }
+
+        } catch (IllegalAccessException e) {
+            throw new ServletException(e);
+        } catch (InvocationTargetException e) {
+            throw new ServletException(e);
+        } catch (NoSuchMethodException e) {
+            throw new ServletException(e);
+        }
+
+        // no changes
+        return parameterValue;
+
+    }
+
+    /**
      * <p>Try to locate a multipart request handler for this request. First,
      * look for a mapping-specific handler stored for us under an attribute.
      * If one is not present, use the global multipart handler, if there is



Mime
View raw message