Remove warning in Jackrabbit
authorMathieu Baudier <mbaudier@argeo.org>
Mon, 21 Sep 2015 12:51:14 +0000 (12:51 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Mon, 21 Sep 2015 12:51:14 +0000 (12:51 +0000)
git-svn-id: https://svn.argeo.org/commons/trunk@8427 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc

org.argeo.cms/src/org/argeo/cms/internal/kernel/NodeHttp.java

index 6dc70144ba3ef6f7ee8f84cc8d189b5647a54c42..09ca7ea771a6c9b2639c8ee65b1ca6fb1d7f68d8 100644 (file)
@@ -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<Void>() {
-                                                       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<Void>() {
+                                       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());
                        }
 
                }