Repository: tomee
Updated Branches:
  refs/heads/master a88c10cb0 -> f003c900e


TOMEE-2239 removing the try-catch block


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/600901a8
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/600901a8
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/600901a8

Branch: refs/heads/master
Commit: 600901a840ef91f7379ebe1615b336cbf7231e80
Parents: a88c10c
Author: Thiago Veronezi <thi...@veronezi.org>
Authored: Wed Sep 19 18:15:04 2018 -0400
Committer: Roberto Cortez <radcor...@yahoo.com>
Committed: Mon Oct 1 11:11:48 2018 +0100

----------------------------------------------------------------------
 .../tomee/microprofile/jwt/MPJWTFilter.java      | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/600901a8/mp-jwt/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java
----------------------------------------------------------------------
diff --git 
a/mp-jwt/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java 
b/mp-jwt/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java
index d35fb93..27b4c57 100644
--- a/mp-jwt/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java
+++ b/mp-jwt/src/main/java/org/apache/tomee/microprofile/jwt/MPJWTFilter.java
@@ -68,24 +68,7 @@ public class MPJWTFilter implements Filter {
         final HttpServletRequest httpServletRequest = (HttpServletRequest) 
request;
 
         // now wrap the httpServletRequest and override the principal so CXF 
can propagate into the SecurityContext
-        try {
-            chain.doFilter(new MPJWTServletRequestWrapper(httpServletRequest, 
authContextInfo.get()), response);
-
-        } catch (final Exception e) {
-            // this is an alternative to the @Provider bellow which requires 
registration on the fly
-            // or users to add it into their webapp for scanning or into the 
Application itself
-            if (MPJWTException.class.isInstance(e)) {
-                final MPJWTException jwtException = 
MPJWTException.class.cast(e);
-                
HttpServletResponse.class.cast(response).sendError(jwtException.getStatus(), 
jwtException.getMessage());
-            }
-
-            if (MPJWTException.class.isInstance(e.getCause())) {
-                final MPJWTException jwtException = 
MPJWTException.class.cast(e.getCause());
-                
HttpServletResponse.class.cast(response).sendError(jwtException.getStatus(), 
jwtException.getMessage());
-            }
-
-        }
-
+        chain.doFilter(new MPJWTServletRequestWrapper(httpServletRequest, 
authContextInfo.get()), response);
     }
 
     @Override

Reply via email to