commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject cvs commit: jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/io BeanCreateRule.java
Date Mon, 03 Jun 2002 19:07:51 GMT
jon         2002/06/03 12:07:51

  Modified:    betwixt/src/java/org/apache/commons/betwixt/io
                        BeanCreateRule.java
  Log:
  proper logging.
  
  -jon
  
  Revision  Changes    Path
  1.13      +7 -5      jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/io/BeanCreateRule.java
  
  Index: BeanCreateRule.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/betwixt/src/java/org/apache/commons/betwixt/io/BeanCreateRule.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- BeanCreateRule.java	1 Jun 2002 20:43:06 -0000	1.12
  +++ BeanCreateRule.java	3 Jun 2002 19:07:51 -0000	1.13
  @@ -5,7 +5,7 @@
    * version 1.1, a copy of which has been included with this distribution in
    * the LICENSE file.
    * 
  - * $Id: BeanCreateRule.java,v 1.12 2002/06/01 20:43:06 jon Exp $
  + * $Id: BeanCreateRule.java,v 1.13 2002/06/03 19:07:51 jon Exp $
    */
   package org.apache.commons.betwixt.io;
   
  @@ -33,7 +33,7 @@
     * from the betwixt XML metadata.</p>
     *
     * @author <a href="mailto:jstrachan@apache.org">James Strachan</a>
  -  * @version $Revision: 1.12 $
  +  * @version $Revision: 1.13 $
     */
   public class BeanCreateRule extends Rule {
   
  @@ -84,8 +84,11 @@
           log.debug( "Called with descriptor: " + descriptor + " propertyType: " + descriptor.getPropertyType()
);
           
           if (log.isTraceEnabled()) {
  -            log.trace("Attributes:");
  -            for (int i =0, size=attributes.getLength(); i<size; i++) {
  +            int attributesLength = attributes.getLength();
  +            if (attributesLength > 0) {
  +                log.trace("Attributes:");
  +            }
  +            for (int i=0, size=attributesLength; i<size; i++) {
                   log.trace("Local:" + attributes.getLocalName(i));
                   log.trace("URI:" + attributes.getURI(i));
                   log.trace("QName:" + attributes.getQName(i));
  @@ -158,7 +161,6 @@
                   digester.push(instance);
               }
           }
  -        
       }
   
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message