cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Add @Override annotation for ContainerRequestFilter#filter implementations, patch from Valentin Aitken applied, This closes #222
Date Mon, 16 Jan 2017 12:51:12 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 3d1e4197c -> a33be7490


Add @Override annotation for ContainerRequestFilter#filter implementations, patch from Valentin
Aitken applied, This closes #222


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

Branch: refs/heads/3.1.x-fixes
Commit: a33be74905bf5eb5c78d8a308248ec6f502a2d16
Parents: 3d1e419
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Jan 16 12:49:32 2017 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Jan 16 12:50:48 2017 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/jaxrs/security/JAASAuthenticationFilter.java   | 3 ++-
 .../apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java   | 1 +
 .../org/apache/cxf/jaxrs/security/SimpleAuthorizingFilter.java    | 3 ++-
 .../apache/cxf/jaxrs/model/wadl/ServerProviderFactoryTest.java    | 1 +
 .../org/apache/cxf/jaxrs/model/wadl/WadlGeneratorJsonTest.java    | 2 +-
 .../cxf/rs/security/cors/CrossOriginResourceSharingFilter.java    | 2 ++
 .../apache/cxf/rs/security/oauth/filters/OAuthRequestFilter.java  | 1 +
 .../cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthHandler.java  | 3 ++-
 .../apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java | 2 ++
 .../apache/cxf/rs/security/saml/sso/SamlPostBindingFilter.java    | 1 +
 .../cxf/rs/security/saml/sso/SamlRedirectBindingFilter.java       | 1 +
 .../org/apache/cxf/rs/security/saml/SamlEnvelopedInHandler.java   | 1 +
 .../java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java   | 3 ++-
 .../java/org/apache/cxf/rs/security/saml/SamlHeaderInHandler.java | 1 +
 .../rs/security/saml/authorization/ClaimsAuthorizingFilter.java   | 1 +
 .../main/java/org/apache/cxf/rs/security/xml/XmlEncInHandler.java | 1 +
 .../main/java/org/apache/cxf/rs/security/xml/XmlSigInHandler.java | 1 +
 .../java/org/apache/cxf/systest/jaxrs/FaultyRequestHandler.java   | 1 +
 18 files changed, 24 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/JAASAuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/JAASAuthenticationFilter.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/JAASAuthenticationFilter.java
index 7992242..9730f45 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/JAASAuthenticationFilter.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/JAASAuthenticationFilter.java
@@ -104,7 +104,8 @@ public class JAASAuthenticationFilter implements ContainerRequestFilter
{
     protected CallbackHandler getCallbackHandler(String name, String password) {
         return new NamePasswordCallbackHandler(name, password);
     }
-    
+
+    @Override
     public void filter(ContainerRequestContext context) {
         Message m = JAXRSUtils.getCurrentMessage();
         try {

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
index 455083c..3390104 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/KerberosAuthenticationFilter.java
@@ -69,6 +69,7 @@ public class KerberosAuthenticationFilter implements ContainerRequestFilter
{
     private String servicePrincipalName;
     private String realm;
     
+    @Override
     public void filter(ContainerRequestContext context) {
         
         List<String> authHeaders = messageContext.getHttpHeaders()

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/SimpleAuthorizingFilter.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/SimpleAuthorizingFilter.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/SimpleAuthorizingFilter.java
index 22c2475..50e7f0d 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/SimpleAuthorizingFilter.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/security/SimpleAuthorizingFilter.java
@@ -32,7 +32,8 @@ import org.apache.cxf.jaxrs.utils.JAXRSUtils;
 public class SimpleAuthorizingFilter implements ContainerRequestFilter {
 
     private AbstractAuthorizingInInterceptor interceptor;
-    
+
+    @Override
     public void filter(ContainerRequestContext context) {
         try {
             interceptor.handleMessage(JAXRSUtils.getCurrentMessage());

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/ServerProviderFactoryTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/ServerProviderFactoryTest.java
b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/ServerProviderFactoryTest.java
index 28842f0..6580663 100644
--- a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/ServerProviderFactoryTest.java
+++ b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/ServerProviderFactoryTest.java
@@ -90,6 +90,7 @@ public class ServerProviderFactoryTest extends Assert {
     @PreMatching
     private static class TestHandler implements ContainerRequestFilter {
 
+        @Override
         public void filter(ContainerRequestContext context) {
             // complete
         }

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorJsonTest.java
----------------------------------------------------------------------
diff --git a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorJsonTest.java
b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorJsonTest.java
index cf36806..de7c6a5 100644
--- a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorJsonTest.java
+++ b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorJsonTest.java
@@ -74,7 +74,7 @@ public class WadlGeneratorJsonTest extends Assert {
         m.put(Message.PROTOCOL_HEADERS, headers);
         
         WadlGenerator wg = new WadlGenerator() {
-            public void filter(ContainerRequestContext context) {
+            @Override public void filter(ContainerRequestContext context) {
                 super.doFilter(context, m);
             }
         };

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
b/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
index f0518e3..bbe2b4f 100644
--- a/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
+++ b/rt/rs/security/cors/src/main/java/org/apache/cxf/rs/security/cors/CrossOriginResourceSharingFilter.java
@@ -110,6 +110,7 @@ public class CrossOriginResourceSharingFilter implements ContainerRequestFilter,
         return ReflectionUtil.getAnnotationForMethodOrContainingClass(m,  annClass);
     }
 
+    @Override
     public void filter(ContainerRequestContext context) {
         Message m = JAXRSUtils.getCurrentMessage();
         
@@ -338,6 +339,7 @@ public class CrossOriginResourceSharingFilter implements ContainerRequestFilter,
         
     }
 
+    @Override
     public void filter(ContainerRequestContext requestContext,
                        ContainerResponseContext responseContext) {
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthRequestFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthRequestFilter.java
b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthRequestFilter.java
index 5373ce1..605c051 100644
--- a/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthRequestFilter.java
+++ b/rt/rs/security/oauth-parent/oauth/src/main/java/org/apache/cxf/rs/security/oauth/filters/OAuthRequestFilter.java
@@ -40,6 +40,7 @@ import org.apache.cxf.security.SecurityContext;
 @PreMatching
 public class OAuthRequestFilter extends AbstractAuthFilter implements ContainerRequestFilter
{
     
+    @Override
     public void filter(ContainerRequestContext context) {
         try {
             Message m = JAXRSUtils.getCurrentMessage();

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthHandler.java
b/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthHandler.java
index 1616c67..6c93499 100644
--- a/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthHandler.java
+++ b/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/auth/saml/Saml2BearerAuthHandler.java
@@ -54,7 +54,8 @@ public class Saml2BearerAuthHandler extends AbstractSamlInHandler {
     public void setSamlOAuthValidator(SamlOAuthValidator validator) {
         samlOAuthValidator = validator;
     }
-    
+
+    @Override
     public void filter(ContainerRequestContext context) {
         Message message = JAXRSUtils.getCurrentMessage();
         Form form = readFormData(message);

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
index 1416dd4..5cc3e6c 100644
--- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
+++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/filters/OAuthRequestFilter.java
@@ -78,6 +78,8 @@ public class OAuthRequestFilter extends AbstractAccessTokenValidator
     private boolean allPermissionsMatch;
     private boolean blockPublicClients;
     private AuthenticationMethod am;
+
+    @Override
     public void filter(ContainerRequestContext context) {
         validateRequest(JAXRSUtils.getCurrentMessage());
     }    

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlPostBindingFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlPostBindingFilter.java
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlPostBindingFilter.java
index 9f2fe74..ee38ba6 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlPostBindingFilter.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlPostBindingFilter.java
@@ -56,6 +56,7 @@ public class SamlPostBindingFilter extends AbstractServiceProviderFilter
{
         this.useDeflateEncoding = useDeflateEncoding;
     }
     
+    @Override
     public void filter(ContainerRequestContext context) {
         Message m = JAXRSUtils.getCurrentMessage();
         if (checkSecurityContext(m)) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlRedirectBindingFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlRedirectBindingFilter.java
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlRedirectBindingFilter.java
index ebfc7b8..04956fa 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlRedirectBindingFilter.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/SamlRedirectBindingFilter.java
@@ -47,6 +47,7 @@ import org.opensaml.saml.saml2.core.AuthnRequest;
 
 public class SamlRedirectBindingFilter extends AbstractServiceProviderFilter {
     
+    @Override
     public void filter(ContainerRequestContext context) {
         Message m = JAXRSUtils.getCurrentMessage();
         if (checkSecurityContext(m)) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlEnvelopedInHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlEnvelopedInHandler.java
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlEnvelopedInHandler.java
index ee10d35..0801a80 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlEnvelopedInHandler.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlEnvelopedInHandler.java
@@ -48,6 +48,7 @@ public class SamlEnvelopedInHandler extends AbstractSamlInHandler {
     public SamlEnvelopedInHandler() {
     }
     
+    @Override
     public void filter(ContainerRequestContext context) {
         Message message = JAXRSUtils.getCurrentMessage();
         String method = (String)message.get(Message.HTTP_REQUEST_METHOD);

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java
index b75b6d8..65cf4c7 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlFormInHandler.java
@@ -41,7 +41,8 @@ public class SamlFormInHandler extends AbstractSamlBase64InHandler {
     
     public SamlFormInHandler() {
     }
-    
+
+    @Override
     public void filter(ContainerRequestContext context) {
         Message message = JAXRSUtils.getCurrentMessage();
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlHeaderInHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlHeaderInHandler.java
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlHeaderInHandler.java
index abf8ada..da6622a 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlHeaderInHandler.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/SamlHeaderInHandler.java
@@ -36,6 +36,7 @@ public class SamlHeaderInHandler extends AbstractSamlBase64InHandler {
     @Context
     private HttpHeaders headers;
     
+    @Override
     public void filter(ContainerRequestContext context) {
         Message message = JAXRSUtils.getCurrentMessage();
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/authorization/ClaimsAuthorizingFilter.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/authorization/ClaimsAuthorizingFilter.java
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/authorization/ClaimsAuthorizingFilter.java
index 09c3d26..e0cc2d1 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/authorization/ClaimsAuthorizingFilter.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/saml/authorization/ClaimsAuthorizingFilter.java
@@ -35,6 +35,7 @@ public class ClaimsAuthorizingFilter implements ContainerRequestFilter {
 
     private ClaimsAuthorizingInterceptor interceptor = new ClaimsAuthorizingInterceptor();
     
+    @Override
     public void filter(ContainerRequestContext context) {
         Message message = JAXRSUtils.getCurrentMessage();
         try {

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlEncInHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlEncInHandler.java
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlEncInHandler.java
index 495b043..ad97a51 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlEncInHandler.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlEncInHandler.java
@@ -29,6 +29,7 @@ import org.apache.cxf.message.Message;
 @PreMatching
 public class XmlEncInHandler extends AbstractXmlEncInHandler implements ContainerRequestFilter
{
     
+    @Override
     public void filter(ContainerRequestContext context) {
         Message message = JAXRSUtils.getCurrentMessage();
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSigInHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSigInHandler.java
b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSigInHandler.java
index 9366ebd..53bbcdd 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSigInHandler.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSigInHandler.java
@@ -29,6 +29,7 @@ import org.apache.cxf.message.Message;
 @PreMatching
 public class XmlSigInHandler extends AbstractXmlSigInHandler implements ContainerRequestFilter
{
     
+    @Override
     public void filter(ContainerRequestContext context) {
         Message message = JAXRSUtils.getCurrentMessage();
         

http://git-wip-us.apache.org/repos/asf/cxf/blob/a33be749/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/FaultyRequestHandler.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/FaultyRequestHandler.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/FaultyRequestHandler.java
index 8dd9a0b..78b8d41 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/FaultyRequestHandler.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/FaultyRequestHandler.java
@@ -31,6 +31,7 @@ public class FaultyRequestHandler implements ContainerRequestFilter {
     @Context
     private UriInfo uriInfo;
     
+    @Override
     public void filter(ContainerRequestContext context) {
         if (uriInfo.getPath().endsWith("/propogateExceptionVar/1")) {
             MultivaluedMap<String, String> vars = uriInfo.getPathParameters();


Mime
View raw message