Author: markt
Date: Wed Jun  3 21:19:16 2009
New Revision: 781553

URL: http://svn.apache.org/viewvc?rev=781553&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=46408
Don't make assumptions about exception type

Modified:
    
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/security/SecurityUtil.java
    tomcat/container/tc5.5.x/webapps/docs/changelog.xml

Modified: 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/security/SecurityUtil.java
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/security/SecurityUtil.java?rev=781553&r1=781552&r2=781553&view=diff
==============================================================================
--- 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/security/SecurityUtil.java
 (original)
+++ 
tomcat/container/tc5.5.x/catalina/src/share/org/apache/catalina/security/SecurityUtil.java
 Wed Jun  3 21:19:16 2009
@@ -274,9 +274,14 @@
             }
 
             Subject.doAsPrivileged(subject, pea, null);       
-       } catch( PrivilegedActionException pe) {
-            Throwable e = ((InvocationTargetException)pe.getException())
+        } catch( PrivilegedActionException pe) {
+            Throwable e;
+            if (pe.getException() instanceof InvocationTargetException) {
+                e = ((InvocationTargetException)pe.getException())
                                 .getTargetException();
+            } else {
+                e = pe;
+            }
             
             if (log.isDebugEnabled()){
                 log.debug(sm.getString("SecurityUtil.doAsPrivilege"), e); 

Modified: tomcat/container/tc5.5.x/webapps/docs/changelog.xml
URL: 
http://svn.apache.org/viewvc/tomcat/container/tc5.5.x/webapps/docs/changelog.xml?rev=781553&r1=781552&r2=781553&view=diff
==============================================================================
--- tomcat/container/tc5.5.x/webapps/docs/changelog.xml (original)
+++ tomcat/container/tc5.5.x/webapps/docs/changelog.xml Wed Jun  3 21:19:16 2009
@@ -88,6 +88,9 @@
         after FORM authentication. (markt)
       </fix>
       <fix>
+        <bug>46408</bug>: Correct possible invalid case in SecurityUtil. 
(markt) 
+      </fix>
+      <fix>
         <bug>46597</bug>: Port all cookie handling changes from Tomcat 6.0.x.
         (markt)
       </fix>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to