cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [cxf] 01/04: Fix some errors from future PMD
Date Fri, 08 Jun 2018 19:31:35 GMT
This is an automated email from the ASF dual-hosted git repository.

dkulp pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git

commit f680234cc83806fabbc0879fd100f4cbfe891c99
Author: Daniel Kulp <dkulp@apache.org>
AuthorDate: Fri Jun 8 14:31:50 2018 -0400

    Fix some errors from future PMD
---
 .../org/apache/cxf/common/util/ReflectionInvokationHandler.java     | 6 +++---
 .../security/OperationInfoAuthorizingInterceptorTest.java           | 3 +--
 .../cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java  | 3 +--
 pom.xml                                                             | 2 +-
 .../org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java   | 4 +---
 .../test/java/org/apache/cxf/systest/handlers/AddNumbersUnwrap.java | 5 ++---
 6 files changed, 9 insertions(+), 14 deletions(-)

diff --git a/core/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
b/core/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
index e4ca998..a7524b6 100644
--- a/core/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
+++ b/core/src/main/java/org/apache/cxf/common/util/ReflectionInvokationHandler.java
@@ -160,19 +160,19 @@ public class ReflectionInvokationHandler implements InvocationHandler
{
 
     @Target(ElementType.PARAMETER)
     @Retention(RetentionPolicy.RUNTIME)
-    public static @interface Optional {
+    public @interface Optional {
     }
 
     @Target(ElementType.METHOD)
     @Retention(RetentionPolicy.RUNTIME)
-    public static @interface WrapReturn {
+    public @interface WrapReturn {
         Class<?> value();
         boolean iterator() default false;
     }
 
     @Target(ElementType.PARAMETER)
     @Retention(RetentionPolicy.RUNTIME)
-    public static @interface UnwrapParam {
+    public @interface UnwrapParam {
         String methodName() default "getValue";
         String typeMethodName() default "#default";
     }
diff --git a/core/src/test/java/org/apache/cxf/interceptor/security/OperationInfoAuthorizingInterceptorTest.java
b/core/src/test/java/org/apache/cxf/interceptor/security/OperationInfoAuthorizingInterceptorTest.java
index ce8d599..fb7096b 100755
--- a/core/src/test/java/org/apache/cxf/interceptor/security/OperationInfoAuthorizingInterceptorTest.java
+++ b/core/src/test/java/org/apache/cxf/interceptor/security/OperationInfoAuthorizingInterceptorTest.java
@@ -59,12 +59,11 @@ public class OperationInfoAuthorizingInterceptorTest extends SimpleAuthorizingIn
 
     @Override
     protected SimpleAuthorizingInterceptor createSimpleAuthorizingInterceptorWithDenyRoles(final
String role) {
-        SimpleAuthorizingInterceptor in = new OperationInfoAuthorizingInterceptor() {
+        return new OperationInfoAuthorizingInterceptor() {
             @Override
             public List<String> getDenyRoles(String key) {
                 return Collections.singletonList(role);
             }
         };
-        return in;
     }
 }
diff --git a/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java
b/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java
index 1b8f10b..563d7a2 100644
--- a/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java
+++ b/core/src/test/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptorTest.java
@@ -72,13 +72,12 @@ public class SimpleAuthorizingInterceptorTest extends Assert {
     }
 
     protected SimpleAuthorizingInterceptor createSimpleAuthorizingInterceptorWithDenyRoles(final
String role) {
-        SimpleAuthorizingInterceptor in = new SimpleAuthorizingInterceptor() {
+        return new SimpleAuthorizingInterceptor() {
             @Override
             public List<String> getDenyRoles(Method m) {
                 return Collections.singletonList(role);
             }
         };
-        return in;
     }
 
     @Test(expected = AccessDeniedException.class)
diff --git a/pom.xml b/pom.xml
index d307182..3f99089 100644
--- a/pom.xml
+++ b/pom.xml
@@ -40,7 +40,7 @@
     </issueManagement>
     <properties>
         <cxf.compiler.fork>false</cxf.compiler.fork>
-        <cxf.build-utils.version>3.4.0</cxf.build-utils.version>
+        <cxf.build-utils.version>3.4.1-SNAPSHOT</cxf.build-utils.version>
         <cxf.xjc-utils.version>3.2.2-SNAPSHOT</cxf.xjc-utils.version>
         <cxf.jdk.version>1.8</cxf.jdk.version>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
index df7972e..2c2ee35 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/WSS4JStaxOutInterceptor.java
@@ -206,7 +206,7 @@ public class WSS4JStaxOutInterceptor extends AbstractWSS4JStaxInterceptor
{
         msg.getExchange().put(SecurityEvent.class.getName() + ".out", outgoingSecurityEventList);
         msg.put(SecurityEvent.class.getName() + ".out", outgoingSecurityEventList);
 
-        final SecurityEventListener securityEventListener = new SecurityEventListener() {
+        return new SecurityEventListener() {
             @Override
             public void registerSecurityEvent(SecurityEvent securityEvent) throws XMLSecurityException
{
                 if (securityEvent.getSecurityEventType() == WSSecurityEventConstants.SAML_TOKEN)
{
@@ -219,8 +219,6 @@ public class WSS4JStaxOutInterceptor extends AbstractWSS4JStaxInterceptor
{
                 }
             }
         };
-
-        return securityEventListener;
     }
 
     protected void configureProperties(
diff --git a/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/AddNumbersUnwrap.java
b/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/AddNumbersUnwrap.java
index 884f7a3..0a3a3fb 100644
--- a/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/AddNumbersUnwrap.java
+++ b/systests/jaxws/src/test/java/org/apache/cxf/systest/handlers/AddNumbersUnwrap.java
@@ -25,7 +25,6 @@ import javax.jws.WebService;
 import javax.xml.ws.RequestWrapper;
 import javax.xml.ws.ResponseWrapper;
 
-//CHECKSTYLE:OFF
 @WebService(targetNamespace = "http://apache.org/handlers", name = "AddNumbers")
 public interface AddNumbersUnwrap {
 
@@ -35,11 +34,11 @@ public interface AddNumbersUnwrap {
     @WebMethod
     @ResponseWrapper(localName = "addNumbersResponse", targetNamespace = "http://apache.org/handlers/types",
                      className = "org.apache.cxf.systest.handlers.types.AddNumbersResponse")
-    public int addNumbers(
+    int addNumbers(
         @WebParam(name = "arg0", targetNamespace = "http://apache.org/handlers/types")
         int arg0,
         @WebParam(name = "arg1", targetNamespace = "http://apache.org/handlers/types")
         int arg1
     );
 }
-//CHECKSTYLE:ON
+

-- 
To stop receiving notification emails like this one, please contact
dkulp@apache.org.

Mime
View raw message