Michael Metternich pushed to branch master at cms-community / hippo-site-toolkit


Commits:
0c45bef8 by Michael Metternich at 2018-02-10T07:02:14+01:00
HSTTWO-4238 absolute rootPath should be set to null if invalid

- - - - -


1 changed file:

- client/src/main/java/org/hippoecm/hst/tag/HstManageContentTag.java


Changes:

=====================================
client/src/main/java/org/hippoecm/hst/tag/HstManageContentTag.java
=====================================
--- a/client/src/main/java/org/hippoecm/hst/tag/HstManageContentTag.java
+++ b/client/src/main/java/org/hippoecm/hst/tag/HstManageContentTag.java
@@ -157,7 +157,7 @@ public class HstManageContentTag extends TagSupport {
             return null;
         }
 
-        final String absoluteRootPath = getAbsoluteRootPath(requestContext);
+        String absoluteRootPath = getAbsoluteRootPath(requestContext);
 
         try {
             final Node rootPathNode = 
requestContext.getSession().getNode(absoluteRootPath);
@@ -165,11 +165,13 @@ public class HstManageContentTag extends TagSupport {
                 log.error("Rootpath '{}' is not a folder node. Parameters 
rootPath and defaultPath are ignored.", rootPath);
                 rootPath = null;
                 defaultPath = null;
+                absoluteRootPath = null;
             }
-        } catch (PathNotFoundException e) {
-            log.error("Rootpath '{}' does not exist. Parameters rootPath and 
defaultPath are ignored.", rootPath);
+        } catch (final PathNotFoundException e) {
+            log.error("Rootpath '{}' does not exist. Parameters rootPath and 
defaultPath are ignored.", rootPath, e);
             rootPath = null;
             defaultPath = null;
+            absoluteRootPath = null;
         }
         return absoluteRootPath;
     }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/0c45bef8d37aeefac629b5d24016b195b5b0e3d0

---
View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/0c45bef8d37aeefac629b5d24016b195b5b0e3d0
You're receiving this email because of your account on code.onehippo.org.
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to