Anonymous avatar Anonymous committed 88604a9

i'm really getting annoyed by these comments being malformed

git-svn-id: http://svn.opensymphony.com/svn/xwork/trunk@142 e221344d-f017-0410-9bd5-d282ab1896d7

Comments (0)

Files changed (1)

src/java/com/opensymphony/xwork/util/InstantiatingNullHandler.java

     //~ Methods ////////////////////////////////////////////////////////////////
 
     /**
- * this is very ugly!  however, it gets the job done.  if the state is set to on, then the InstantiatingNullHandler
- * will create a new object if the requested property does not already exist.  the intended paradigm is
- *
- * <pre>
- * try {
- *    InstantiatingNullHandler.setState(true);
- *    // call Ognl setters
- * } finally {
- *    InstantiatingNullHandler.setState(false);
- * }
- * </pre>
- * @param on indicates whether or not new objects should be created
- */
+     * this is very ugly!  however, it gets the job done.  if the state is set to on, then the InstantiatingNullHandler
+     * will create a new object if the requested property does not already exist.  the intended paradigm is
+     *
+     * <pre>
+     * try {
+     *    InstantiatingNullHandler.setState(true);
+     *    // call Ognl setters
+     * } finally {
+     *    InstantiatingNullHandler.setState(false);
+     * }
+     * </pre>
+     * @param on indicates whether or not new objects should be created
+     */
     public static void setState(boolean on) {
         if (on) {
             state.set(Boolean.TRUE);
     }
 
     /**
- * @see NullHandler#nullPropertyValue(Map, Object, Object) for additional documentation
- * @param context
- * @param target
- * @param property
- * @return
- */
+     * @see NullHandler#nullPropertyValue(Map, Object, Object) for additional documentation
+     * @param context
+     * @param target
+     * @param property
+     * @return
+     */
     public Object nullPropertyValue(Map context, Object target, Object property) {
         if (state.get() == null) {
             return null;
         Method method = getMethod(methodMap, property.toString(), target);
 
         /**
- * if we didn't find any single parameter setters for this method, then there's nothing we can do.
- */
+         * if we didn't find any single parameter setters for this method, then there's nothing we can do.
+         */
         if (method == null) {
             return null;
         }
         try {
             Class clazz = method.getParameterTypes()[0];
             Object param = clazz.newInstance();
-            method.invoke(target, new Object[] {param});
+            method.invoke(target, new Object[]{param});
 
             return param;
         } catch (Exception e) {
     }
 
     /**
- * Attempt to find the setter associated with the provided instance and propertyName.  If we do find it, place that
- * Method into the methodMap keyed by property name
- * @param methodMap
- * @param propertyName the name of the property we're looking up
- * @param instance of instance of the Class we're attempting to find the setter for
- * @return
- */
+     * Attempt to find the setter associated with the provided instance and propertyName.  If we do find it, place that
+     * Method into the methodMap keyed by property name
+     * @param methodMap
+     * @param propertyName the name of the property we're looking up
+     * @param instance of instance of the Class we're attempting to find the setter for
+     * @return
+     */
     private Method getMethod(Map methodMap, String propertyName, Object instance) {
         synchronized (methodMap) {
             Method method = (Method) methodMap.get(propertyName);
     }
 
     /**
- * returns the Map associated with a given Class of Objects
- * @param instance an instance of the Class we're interested in
- * @return a Map of Method instances keyed by property name
- */
+     * returns the Map associated with a given Class of Objects
+     * @param instance an instance of the Class we're interested in
+     * @return a Map of Method instances keyed by property name
+     */
     private Map getMethodMap(Object instance) {
         synchronized (clazzMap) {
             Map methodMap = (Map) clazzMap.get(instance.getClass());
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.