Repository: tomee
Updated Branches:
  refs/heads/tomee-7.1.x 08a88a02a -> a32354b9d


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/1bf79631
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/1bf79631
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/1bf79631

Branch: refs/heads/tomee-7.1.x
Commit: 1bf79631b212372997dec2ce274eef631f049582
Parents: 08a88a0
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:32:14 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/1bf79631/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