From a858f07888bba7e941c36a3ba3ca464c4605d85a Mon Sep 17 00:00:00 2001 From: mdb Date: Thu, 1 Nov 2007 20:50:26 +0000 Subject: [PATCH] Widening. git-svn-id: https://samskivert.googlecode.com/svn/trunk@2251 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../samskivert/xml/SetPropertyFieldsRule.java | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/java/com/samskivert/xml/SetPropertyFieldsRule.java b/src/java/com/samskivert/xml/SetPropertyFieldsRule.java index 73b2b413..7d2048cd 100644 --- a/src/java/com/samskivert/xml/SetPropertyFieldsRule.java +++ b/src/java/com/samskivert/xml/SetPropertyFieldsRule.java @@ -30,8 +30,8 @@ import com.samskivert.util.StringUtil; import com.samskivert.util.ValueMarshaller; /** - * Sets the fields in the object on the top of the stack from the - * attributes available in the matched element. + * Sets the fields in the object on the top of the stack from the attributes available in the + * matched element. */ public class SetPropertyFieldsRule extends Rule { @@ -73,8 +73,8 @@ public class SetPropertyFieldsRule extends Rule } /** - * Configures this rule to warn or not when it skips properties for - * which there are no associated object fields. + * Configures this rule to warn or not when it skips properties for which there are no + * associated object fields. */ public void setWarnNonFields (boolean warnNonFields) { @@ -87,8 +87,7 @@ public class SetPropertyFieldsRule extends Rule Object top = digester.peek(); Class topclass = top.getClass(); - // iterate over the attributes, setting public fields where - // applicable + // iterate over the attributes, setting public fields where applicable for (int i = 0; i < attrs.getLength(); i++) { String lname = attrs.getLocalName(i); if (StringUtil.isBlank(lname)) { @@ -102,8 +101,7 @@ public class SetPropertyFieldsRule extends Rule } catch (NoSuchFieldException nsfe) { if (_warnNonFields) { digester.getLogger().warn( - "Skipping property '" + lname + - "' for which there is no field."); + "Skipping property '" + lname + "' for which there is no field."); } continue; } @@ -118,14 +116,14 @@ public class SetPropertyFieldsRule extends Rule ((parser = _parsers.get(lname)) != null)) { value = parser.parse(valstr); } else { - // otherwise use the value marshaller to parse the - // property based on the type of the target object field + // otherwise use the value marshaller to parse the property based on the type of + // the target object field value = ValueMarshaller.unmarshal(field.getType(), valstr); } if (digester.getLogger().isDebugEnabled()) { - digester.getLogger().debug(" Setting property '" + lname + - "' to '" + valstr + "'"); + digester.getLogger().debug( + " Setting property '" + lname + "' to '" + valstr + "'"); } // and finally set the field