You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by lu...@apache.org on 2004/08/17 17:33:39 UTC

cvs commit: jakarta-slide/src/share/org/apache/slide/macro MacroImpl.java

luetzkendorf    2004/08/17 08:33:39

  Modified:    src/share/org/apache/slide/macro Tag:
                        SLIDE_2_1_RELEASE_BRANCH MacroImpl.java
  Log:
  fix that allows shallow copies (COPY with Depth: 0 )
  verifyable with testcase functional/copy/mix/copyDepth0
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.41.2.1  +14 -13    jakarta-slide/src/share/org/apache/slide/macro/MacroImpl.java
  
  Index: MacroImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-slide/src/share/org/apache/slide/macro/MacroImpl.java,v
  retrieving revision 1.41
  retrieving revision 1.41.2.1
  diff -u -r1.41 -r1.41.2.1
  --- MacroImpl.java	28 Jul 2004 09:35:25 -0000	1.41
  +++ MacroImpl.java	17 Aug 2004 15:33:39 -0000	1.41.2.1
  @@ -707,15 +707,16 @@
               }
               
               // We copy each of this object's children
  -            
  -            while(sourceNodeChildren.hasMoreElements()) {
  -                String childUri = (String) sourceNodeChildren.nextElement();
  -                String childDestinationUri = destinationUri + childUri
  -                    .substring(sourceNode.getUri().length());
  -                copyObject(token, childUri, childDestinationUri,
  -                           parameters, false, e, copyRedirector, copyListener,
  -                           deleteRedirector, deleteListener
  -                          );
  +            if (parameters.isRecursive()) {
  +	            while(sourceNodeChildren.hasMoreElements()) {
  +	                String childUri = (String) sourceNodeChildren.nextElement();
  +	                String childDestinationUri = destinationUri + childUri
  +	                    .substring(sourceNode.getUri().length());
  +	                copyObject(token, childUri, childDestinationUri,
  +	                           parameters, false, e, copyRedirector, copyListener,
  +	                           deleteRedirector, deleteListener
  +	                          );
  +	            }
               }
               
           } catch(SlideException ex) {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org