X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.support.jcr%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fjcr%2FSlcJcrUtils.java;h=af7385000ffdb76e715ad0b4c28a84d6319b4764;hb=0214b0b8cd66e15c68dc1b0a14f110c05a9a0062;hp=52931218bcbe1c15142c9ec4744b16c6b55c9304;hpb=844bc386a1854a29d282a23ffda820ed7a52b74e;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/SlcJcrUtils.java b/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/SlcJcrUtils.java index 52931218b..af7385000 100644 --- a/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/SlcJcrUtils.java +++ b/runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/SlcJcrUtils.java @@ -89,9 +89,12 @@ public class SlcJcrUtils implements SlcNames { public static String createResultPath(Session session, String uuid) throws RepositoryException { Calendar now = new GregorianCalendar(); - return UserJcrUtils.getUserHome(session).getPath() + '/' - + SlcNames.SLC_RESULTS + '/' + JcrUtils.dateAsPath(now, true) - + uuid; + Node userHome = UserJcrUtils.getUserHome(session); + if (userHome == null) + throw new SlcException("No user home available for " + + session.getUserID()); + return userHome.getPath() + '/' + SlcNames.SLC_RESULTS + '/' + + JcrUtils.dateAsPath(now, true) + uuid; } /**