From eedde3ce5e5de8b82a7ca30588e5403a90cd8d92 Mon Sep 17 00:00:00 2001 From: David Jencks Date: Fri, 31 Jul 2009 23:51:31 +0000 Subject: [PATCH] Bug 285119 improve run-as notification to identity service git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@613 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../org/eclipse/jetty/servlet/ServletHolder.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java index d8cc84984e5..b132c5082ef 100644 --- a/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java +++ b/jetty-servlet/src/main/java/org/eclipse/jetty/servlet/ServletHolder.java @@ -263,7 +263,7 @@ public class ServletHolder extends Holder implements UserIdentity.Scope, Compara { try { - if (_identityService!=null && _runAsToken!=null) + if (_identityService!=null) old_run_as=_identityService.setRunAs(_identityService.getSystemUserIdentity(),_runAsToken); destroyInstance(_servlet); @@ -274,7 +274,7 @@ public class ServletHolder extends Holder implements UserIdentity.Scope, Compara } finally { - if (_identityService!=null && _runAsToken!=null) + if (_identityService!=null) _identityService.unsetRunAs(old_run_as); } } @@ -404,7 +404,7 @@ public class ServletHolder extends Holder implements UserIdentity.Scope, Compara _servlet = getServletHandler().customizeServlet(_servlet); // Handle run as - if (_identityService!=null && _runAsToken!=null) + if (_identityService!=null) { old_run_as=_identityService.setRunAs(_identityService.getSystemUserIdentity(),_runAsToken); } @@ -435,7 +435,7 @@ public class ServletHolder extends Holder implements UserIdentity.Scope, Compara finally { // pop run-as role - if (_identityService!=null && _runAsToken!=null) + if (_identityService!=null) _identityService.unsetRunAs(old_run_as); } } @@ -512,7 +512,7 @@ public class ServletHolder extends Holder implements UserIdentity.Scope, Compara request.setAttribute("org.apache.catalina.jsp_file",_forcedPath); // Handle run as - if (_identityService!=null && _runAsToken!=null) + if (_identityService!=null) old_run_as=_identityService.setRunAs(baseRequest.getUserIdentity(),_runAsToken); if (!isAsyncSupported()) @@ -531,7 +531,7 @@ public class ServletHolder extends Holder implements UserIdentity.Scope, Compara baseRequest.setAsyncSupported(suspendable); // pop run-as role - if (_identityService!=null && _runAsToken!=null) + if (_identityService!=null) _identityService.unsetRunAs(old_run_as); // Handle error params.