portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject svn commit: r350011 - /portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
Date Wed, 30 Nov 2005 18:51:42 GMT
Author: taylor
Date: Wed Nov 30 10:51:40 2005
New Revision: 350011

URL: http://svn.apache.org/viewcvs?rev=350011&view=rev
Log:
fix NPE in deep copy

Modified:
    portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java

Modified: portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java?rev=350011&r1=350010&r2=350011&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
(original)
+++ portals/jetspeed-2/trunk/components/page-manager/src/java/org/apache/jetspeed/page/AbstractPageManager.java
Wed Nov 30 10:51:40 2005
@@ -814,6 +814,12 @@
         Folder dstFolder = this.copyFolder(srcFolder, destinationPath);
         if (owner != null)
         {
+            SecurityConstraints constraints = dstFolder.getSecurityConstraints();
+            if (constraints == null)
+            {
+                constraints = this.newSecurityConstraints();
+                dstFolder.setSecurityConstraints(constraints);
+            }
             dstFolder.getSecurityConstraints().setOwner(owner);
         }
         this.updateFolder(dstFolder);
@@ -833,7 +839,7 @@
         {
             Folder folder = (Folder)folders.next();
             String newPath = concatenatePaths(destinationPath, folder.getName()); 
-            deepCopyFolder(folder, newPath, owner);
+            deepCopyFolder(folder, newPath, null);
         }        
     }
         



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


Mime
View raw message