Author: niallp
Date: Sat Jul 28 18:48:20 2007
New Revision: 560652

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

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

Modified: 
struts/struts1/branches/STRUTS_1_3_BRANCH/core/src/main/java/org/apache/struts/util/RequestUtils.java
URL: 
http://svn.apache.org/viewvc/struts/struts1/branches/STRUTS_1_3_BRANCH/core/src/main/java/org/apache/struts/util/RequestUtils.java?view=diff&rev=560652&r1=560651&r2=560652
==============================================================================
--- 
struts/struts1/branches/STRUTS_1_3_BRANCH/core/src/main/java/org/apache/struts/util/RequestUtils.java
 (original)
+++ 
struts/struts1/branches/STRUTS_1_3_BRANCH/core/src/main/java/org/apache/struts/util/RequestUtils.java
 Sat Jul 28 18:48:20 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


Reply via email to