You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@turbine.apache.org by di...@multitask.com.au on 2002/04/06 17:33:15 UTC

Patch for Mapper.java

--
dIon Gillard, Multitask Consulting
Work:      http://www.multitask.com.au
Developers: http://adslgateway.multitask.com.au/developers

Re: Patch for Mapper.java

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Jason, did we need this one?

dion@multitask.com.au writes:

> --
> dIon Gillard, Multitask Consulting
> Work:      http://www.multitask.com.au
> Developers: http://adslgateway.multitask.com.au/developers
>
> Index: Mapper.java
> ===================================================================
> RCS file: /home/cvs/jakarta-turbine-stratum/src/java/org/apache/stratum/xo/Mapper.java,v
> retrieving revision 1.18
> diff -u -r1.18 Mapper.java
> --- Mapper.java	22 Mar 2002 20:42:43 -0000	1.18
> +++ Mapper.java	6 Apr 2002 15:23:33 -0000
> @@ -471,11 +471,11 @@
>                          if (o == null)
>                          {
>                              o = createInstance((Element) node, null);
> -                            
> +
>                              if (o == null)
>                              {
>                                  continue;
> -                            }                                
> +                            }
>                          }
>  
>                          // Now we have to attach the newly created object
> @@ -618,7 +618,7 @@
>          catch (Exception noAttrib)
>          {
>              debug("Using " + className + " unsuccessful: " + noAttrib);
> -            
> +
>              // We assume here that the object that we are creating is
>              // in the same package as the parent object.
>              String nodeName = element.getName();
> @@ -627,10 +627,10 @@
>                  throw new Exception("Base package not known and " + CLASS_NAME +
>                                      " attribute not specified (or wrong)");
>              }
> -            
> +
>              className = (basePackage.length() == 0 ? "" : basePackage + '.') +
>                  nodeName.substring(0, 1).toUpperCase() + nodeName.substring(1);
> -            
> +
>              // TODO: Check class name validity
>              try
>              {
> @@ -665,7 +665,7 @@
>       */
>      private boolean hasChildren(Node node)
>      {
> -        return (((Element) node).nodeCount() > 1);
> +        return !((Element) node).isTextOnly();
>      }
>  
>      /**
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>