From 40fb72c509bd15827a5d77f3392850937f0cf0eb Mon Sep 17 00:00:00 2001 From: Mathieu Baudier Date: Mon, 21 Sep 2015 12:51:14 +0000 Subject: [PATCH] Remove warning in Jackrabbit git-svn-id: https://svn.argeo.org/commons/trunk@8427 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- .../argeo/cms/internal/kernel/NodeHttp.java | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/org.argeo.cms/src/org/argeo/cms/internal/kernel/NodeHttp.java b/org.argeo.cms/src/org/argeo/cms/internal/kernel/NodeHttp.java index 6dc70144b..09ca7ea77 100644 --- a/org.argeo.cms/src/org/argeo/cms/internal/kernel/NodeHttp.java +++ b/org.argeo.cms/src/org/argeo/cms/internal/kernel/NodeHttp.java @@ -135,6 +135,9 @@ class NodeHttp implements KernelConstants, ArgeoJcrConstants { ip.setProperty(RemotingServlet.INIT_PARAM_HOME, KernelUtils.getOsgiInstanceDir() + "/tmp/jackrabbit"); ip.setProperty(RemotingServlet.INIT_PARAM_TMP_DIRECTORY, "remoting"); + // in order to avoid annoying warning. + ip.setProperty(RemotingServlet.INIT_PARAM_PROTECTED_HANDLERS_CONFIG, + ""); // Cast to servlet because of a weird behaviour in Eclipse httpService.registerFilter(path, anonymous ? new AnonymousFilter() : new DavFilter(), null, null); @@ -357,26 +360,22 @@ class NodeHttp implements KernelConstants, ArgeoJcrConstants { } // do filter as subject try { - Subject.doAs(subject, - new PrivilegedExceptionAction() { - public Void run() throws IOException, - ServletException { - // add security context to session - httpSession.setAttribute( - ACCESS_CONTROL_CONTEXT, - AccessController.getContext()); - filterChain.doFilter(request, response); - return null; - } - }); + Subject.doAs(subject, new PrivilegedExceptionAction() { + public Void run() throws IOException, ServletException { + // add security context to session + httpSession.setAttribute(ACCESS_CONTROL_CONTEXT, + AccessController.getContext()); + filterChain.doFilter(request, response); + return null; + } + }); } catch (PrivilegedActionException e) { if (e.getCause() instanceof ServletException) throw (ServletException) e.getCause(); else if (e.getCause() instanceof IOException) throw (IOException) e.getCause(); else - throw new CmsException("Unexpected exception", - e.getCause()); + throw new CmsException("Unexpected exception", e.getCause()); } } -- 2.30.2