cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [cxf] 01/02: Fixing some issues thrown up by ErrorProne
Date Wed, 18 Oct 2017 17:12:04 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 71fd0ac3f059ea34c37da9513bb8a2be8641b891
Author: Colm O hEigeartaigh <coheigea@apache.org>
AuthorDate: Wed Oct 18 15:31:33 2017 +0100

    Fixing some issues thrown up by ErrorProne
---
 .../java/org/apache/cxf/configuration/jsse/SSLUtils.java |  2 +-
 .../apache/cxf/interceptor/OutgoingChainInterceptor.java |  2 +-
 .../java/org/apache/cxf/bus/extension/ExtensionTest.java |  4 ++++
 .../apache/cxf/common/security/SimplePrincipalTest.java  |  2 ++
 .../java/org/apache/cxf/common/util/UrlUtilsTest.java    | 15 +++++----------
 .../cxf/configuration/spring/ConfigurerImplTest.java     |  6 +++---
 .../ResourceAdapterInternalExceptionTest.java            |  6 ++----
 .../apache/cxf/jca/cxf/ManagedConnectionImplTest.java    |  1 +
 .../org/apache/cxf/binding/corba/CorbaBindingTest.java   |  2 ++
 .../apache/cxf/binding/corba/CorbaServerConduitTest.java |  1 +
 .../cxf/jaxws/support/JaxWsServiceFactoryBean.java       |  3 +--
 .../cxf/jaxws/handler/LogicalHandlerInterceptorTest.java |  2 ++
 .../org/apache/cxf/javascript/fortest/TestBean1.java     |  2 +-
 .../org/apache/cxf/javascript/fortest/TestBean3.java     |  2 +-
 .../ResponseTimeMessageInInterceptorTest.java            |  1 +
 .../management/jmx/export/ModelMBeanAssemblerTest.java   |  4 ++--
 .../apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java   |  2 +-
 .../cxf/jaxrs/provider/atom/AtomFeedProviderTest.java    |  1 +
 .../apache/cxf/jaxrs/provider/json/JSONProviderTest.java |  2 ++
 .../cxf/jaxrs/rx2/server/StreamingAsyncSubscriber.java   |  2 +-
 .../jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java    |  2 +-
 .../ext/search/tika/TikaLuceneContentExtractor.java      |  2 +-
 .../ext/search/jpa/JPATypedQueryVisitorFiqlTest.java     |  3 +--
 .../ext/search/jpa/JPATypedQueryVisitorODataTest.java    |  3 +--
 .../rs/security/oauth2/grants/saml/Saml2BearerGrant.java |  2 +-
 .../cxf/transport/http/HTTPConduitURLEasyMockTest.java   |  2 ++
 .../org/apache/cxf/ws/addressing/soap/MAPCodecTest.java  |  1 +
 .../cxf/sts/token/provider/SAMLProviderActAsTest.java    |  7 +------
 .../sts/token/provider/SAMLProviderOnBehalfOfTest.java   |  7 +------
 .../cxf/systest/sts/caching/ServerCachingTest.java       |  2 +-
 .../org/apache/cxf/xkms/x509/utils/X509UtilsTest.java    |  2 ++
 .../http_undertow/websocket/WebSocketTestClient.java     |  3 ++-
 .../cxf/systest/type_test/AbstractTypeTestClient.java    | 16 +++++++---------
 .../java/org/apache/cxf/tools/fortest/addr/WSAImpl2.java |  2 +-
 .../org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java   |  4 ++++
 .../cxf/tools/wsdlto/jaxws/JAXWSContainerTest.java       |  1 +
 36 files changed, 63 insertions(+), 58 deletions(-)

diff --git a/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java b/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
index 63d1a67..49eb6ed 100644
--- a/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
+++ b/core/src/main/java/org/apache/cxf/configuration/jsse/SSLUtils.java
@@ -319,7 +319,7 @@ public final class SSLUtils {
         // then just use the defaults
         if ((defaultCipherSuites != null && defaultCipherSuites.length != 0)
             && (filters == null || !(filters.isSetInclude() || filters.isSetExclude())))
{
-            LogUtils.log(log, Level.FINE, "CIPHERSUITES_SET", defaultCipherSuites.toString());
+            LogUtils.log(log, Level.FINE, "CIPHERSUITES_SET", Arrays.toString(defaultCipherSuites));
             return defaultCipherSuites;
         }
 
diff --git a/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
index 34b49e1..b1085b1 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/OutgoingChainInterceptor.java
@@ -114,7 +114,7 @@ public class OutgoingChainInterceptor extends AbstractPhaseInterceptor<Message>
                 ex.put(ConduitSelector.class,
                        new PreexistingConduitSelector(conduit, ex.getEndpoint()));
             } catch (IOException e) {
-                new Fault(e);
+                throw new Fault(e);
             }
         }
         return conduit;
diff --git a/core/src/test/java/org/apache/cxf/bus/extension/ExtensionTest.java b/core/src/test/java/org/apache/cxf/bus/extension/ExtensionTest.java
index 85b01b1..6d0d5c9 100644
--- a/core/src/test/java/org/apache/cxf/bus/extension/ExtensionTest.java
+++ b/core/src/test/java/org/apache/cxf/bus/extension/ExtensionTest.java
@@ -51,6 +51,7 @@ public class ExtensionTest extends Assert {
         e.setClassname("no.such.Extension");
         try {
             e.load(cl, null);
+            fail("Failure expected");
         } catch (ExtensionException ex) {
             assertTrue("ExtensionException does not wrap ClassNotFoundException",
                        ex.getCause() instanceof ClassNotFoundException);
@@ -59,6 +60,7 @@ public class ExtensionTest extends Assert {
         e.setClassname("java.lang.System");
         try {
             e.load(cl, null);
+            fail("Failure expected");
         } catch (ExtensionException ex) {
             assertTrue("ExtensionException does not wrap NoSuchMethodException " + ex.getCause(),
                        ex.getCause() instanceof NoSuchMethodException);
@@ -66,6 +68,7 @@ public class ExtensionTest extends Assert {
         e.setClassname(MyServiceConstructorThrowsException.class.getName());
         try {
             e.load(cl, null);
+            fail("Failure expected");
         } catch (ExtensionException ex) {
             assertTrue("ExtensionException does not wrap IllegalArgumentException",
                        ex.getCause() instanceof IllegalArgumentException);
@@ -82,6 +85,7 @@ public class ExtensionTest extends Assert {
         e.setInterfaceName("no.such.Extension");
         try {
             e.loadInterface(cl);
+            fail("Failure expected");
         } catch (ExtensionException ex) {
             assertTrue("ExtensionException does not wrap ClassNotFoundException",
                        ex.getCause() instanceof ClassNotFoundException);
diff --git a/core/src/test/java/org/apache/cxf/common/security/SimplePrincipalTest.java b/core/src/test/java/org/apache/cxf/common/security/SimplePrincipalTest.java
index ee3c620..27bb7cb 100644
--- a/core/src/test/java/org/apache/cxf/common/security/SimplePrincipalTest.java
+++ b/core/src/test/java/org/apache/cxf/common/security/SimplePrincipalTest.java
@@ -29,10 +29,12 @@ public class SimplePrincipalTest extends Assert {
         new SimplePrincipal(null);
     }
 
+    @Test
     public void testEquals() {
         assertEquals(new SimplePrincipal("barry"), new SimplePrincipal("barry"));
     }
 
+    @Test
     public void testNotEquals() {
         assertFalse(new SimplePrincipal("barry").equals(new SimplePrincipal("john")));
     }
diff --git a/core/src/test/java/org/apache/cxf/common/util/UrlUtilsTest.java b/core/src/test/java/org/apache/cxf/common/util/UrlUtilsTest.java
index ff409de..4fd1537 100644
--- a/core/src/test/java/org/apache/cxf/common/util/UrlUtilsTest.java
+++ b/core/src/test/java/org/apache/cxf/common/util/UrlUtilsTest.java
@@ -48,32 +48,28 @@ public class UrlUtilsTest extends Assert {
         try {
             UrlUtils.urlDecode("%");
             fail();
-        } catch (Throwable e) {
-            assertTrue(e instanceof IllegalArgumentException);
+        } catch (IllegalArgumentException e) {
             assertTrue(e.getMessage().startsWith("Invalid URL encoding"));
         }
 
         try {
             UrlUtils.urlDecode("a%%%%");
             fail();
-        } catch (Throwable e) {
-            assertTrue(e instanceof IllegalArgumentException);
+        } catch (IllegalArgumentException e) {
             assertTrue(e.getMessage().startsWith("Invalid URL encoding"));
         }
 
         try {
             UrlUtils.urlDecode("a%2B%");
             fail();
-        } catch (Throwable e) {
-            assertTrue(e instanceof IllegalArgumentException);
+        } catch (IllegalArgumentException e) {
             assertTrue(e.getMessage().startsWith("Invalid URL encoding"));
         }
 
         try {
             UrlUtils.urlDecode("%2");
             fail();
-        } catch (Throwable e) {
-            assertTrue(e instanceof IllegalArgumentException);
+        } catch (IllegalArgumentException e) {
             assertTrue(e.getMessage().startsWith("Invalid URL encoding"));
         }
     }
@@ -83,8 +79,7 @@ public class UrlUtilsTest extends Assert {
         try {
             UrlUtils.urlDecode("%2$");
             fail();
-        } catch (Throwable e) {
-            assertTrue(e instanceof IllegalArgumentException);
+        } catch (IllegalArgumentException e) {
             assertTrue(e.getMessage().startsWith("Invalid URL encoding"));
         }
     }
diff --git a/core/src/test/java/org/apache/cxf/configuration/spring/ConfigurerImplTest.java
b/core/src/test/java/org/apache/cxf/configuration/spring/ConfigurerImplTest.java
index 49dac5f..40e4491 100644
--- a/core/src/test/java/org/apache/cxf/configuration/spring/ConfigurerImplTest.java
+++ b/core/src/test/java/org/apache/cxf/configuration/spring/ConfigurerImplTest.java
@@ -83,7 +83,7 @@ public class ConfigurerImplTest extends Assert {
         assertEquals("Unexpected value for attribute decimalAttr",
                      new BigDecimal("5"), sb.getDecimalAttr());
         assertEquals("Unexpected value for attribute floatAttr",
-                     new Float(6F), sb.getFloatAttr());
+                     Float.valueOf(6F), sb.getFloatAttr());
         assertEquals("Unexpected value for attribute doubleAttr",
                      Double.valueOf(7.0D), sb.getDoubleAttr());
         assertEquals("Unexpected value for attribute byteAttr",
@@ -150,7 +150,7 @@ public class ConfigurerImplTest extends Assert {
         assertEquals("Unexpected value for attribute decimalAttr",
                      new BigDecimal("15"), sb.getDecimalAttr());
         assertEquals("Unexpected value for attribute floatAttr",
-                     new Float(16F), sb.getFloatAttr());
+                     Float.valueOf(16F), sb.getFloatAttr());
         assertEquals("Unexpected value for attribute doubleAttr",
                      Double.valueOf(17D), sb.getDoubleAttr());
         assertEquals("Unexpected value for attribute byteAttr",
@@ -250,7 +250,7 @@ public class ConfigurerImplTest extends Assert {
         private Long longAttr = Long.valueOf(3);
         private Short shortAttr = Short.valueOf((short)4);
         private BigDecimal decimalAttr = new BigDecimal("5");
-        private Float floatAttr = new Float(6F);
+        private Float floatAttr = Float.valueOf(6F);
         private Double doubleAttr = Double.valueOf(7D);
         private Byte byteAttr = Byte.valueOf((byte)8);
         private QName qnameAttr = new QName("http://www.w3.org/2001/XMLSchema", "schema",
"xs");
diff --git a/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceAdapterInternalExceptionTest.java
b/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceAdapterInternalExceptionTest.java
index 159da3c..6f69e78 100644
--- a/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceAdapterInternalExceptionTest.java
+++ b/integration/jca/src/test/java/org/apache/cxf/jca/core/resourceadapter/ResourceAdapterInternalExceptionTest.java
@@ -46,8 +46,7 @@ public class ResourceAdapterInternalExceptionTest extends Assert {
 
     @Test
     public void testMessage() {
-        final String msg = "msg1";
-        msg.intern();
+        final String msg = "msg1".intern();
 
         Exception e = new ResourceAdapterInternalException(msg);
         assertTrue(e.toString().indexOf(msg) != -1);
@@ -57,8 +56,7 @@ public class ResourceAdapterInternalExceptionTest extends Assert {
 
     @Test
     public void testMessageWithNullTx() {
-        final String msg = "msg1";
-        msg.intern();
+        final String msg = "msg1".intern();
 
         javax.resource.spi.ResourceAdapterInternalException e = new ResourceAdapterInternalException(msg,
                                                                                         
            null);
diff --git a/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionImplTest.java
b/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionImplTest.java
index 03b51cb..42a085b 100644
--- a/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionImplTest.java
+++ b/integration/jca/src/test/java/org/apache/cxf/jca/cxf/ManagedConnectionImplTest.java
@@ -78,6 +78,7 @@ public class ManagedConnectionImplTest extends ManagedConnectionTestBase
{
         assertTrue("Checking implementation of passed interface", o instanceof Greeter);
     }
 
+    @Test
     @Ignore
     public void testGetConnectionWithNoPortReturnsConnection() throws Exception {
 
diff --git a/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/CorbaBindingTest.java
b/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/CorbaBindingTest.java
index 4861591..82e1530 100644
--- a/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/CorbaBindingTest.java
+++ b/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/CorbaBindingTest.java
@@ -25,6 +25,7 @@ import java.util.List;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.message.MessageImpl;
+import org.junit.After;
 import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
@@ -44,6 +45,7 @@ public class CorbaBindingTest extends Assert {
         orb = ORB.init(new String[0], props);
     }
 
+    @After
     public void tearDown() {
         if (orb != null) {
             try {
diff --git a/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/CorbaServerConduitTest.java
b/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/CorbaServerConduitTest.java
index afa4059..abf178c 100644
--- a/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/CorbaServerConduitTest.java
+++ b/rt/bindings/corba/src/test/java/org/apache/cxf/binding/corba/CorbaServerConduitTest.java
@@ -290,6 +290,7 @@ public class CorbaServerConduitTest extends Assert {
         control.verify();
     }
 
+    @Test
     public void testGetTarget()  {
         CorbaServerConduit conduit = setupCorbaServerConduit(false);
         EndpointReferenceType endpoint = conduit.getTarget();
diff --git a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
index 7923ff5..8631221 100644
--- a/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
+++ b/rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/support/JaxWsServiceFactoryBean.java
@@ -526,8 +526,7 @@ public class JaxWsServiceFactoryBean extends ReflectionServiceFactoryBean
{
 
     private FaultInfo getFaultInfo(final OperationInfo operation, final Class<?> expClass)
{
         for (FaultInfo fault : operation.getFaults()) {
-            if (fault.getProperty(Class.class.getName()) == expClass
-                || fault.getProperty(Class.class.getName()) == expClass) {
+            if (fault.getProperty(Class.class.getName()) == expClass) {
                 return fault;
             }
         }
diff --git a/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java
b/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java
index 81e11eb..ea10711 100644
--- a/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java
+++ b/rt/frontend/jaxws/src/test/java/org/apache/cxf/jaxws/handler/LogicalHandlerInterceptorTest.java
@@ -109,6 +109,8 @@ public class LogicalHandlerInterceptorTest extends Assert {
     //direction is reversed during processing of a request message then the message
     //becomes a response message.
     //NOTE: commented out as this has been covered by other tests.
+    @Test
+    @org.junit.Ignore
     public void xtestReturnFalseClientSide() throws Exception {
         @SuppressWarnings("rawtypes")
         List<Handler> list = new ArrayList<>();
diff --git a/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/TestBean1.java
b/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/TestBean1.java
index 42a3035..0d29848 100644
--- a/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/TestBean1.java
+++ b/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/TestBean1.java
@@ -87,7 +87,7 @@ public class TestBean1 {
                 return false;
             }
         } else {
-            if (!base64Item.equals(other.base64Item)) {
+            if (!Arrays.equals(base64Item, other.base64Item)) {
                 return false;
             }
         }
diff --git a/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/TestBean3.java
b/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/TestBean3.java
index 4c2e52a..518559d 100644
--- a/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/TestBean3.java
+++ b/rt/javascript/javascript-tests/src/test/java/org/apache/cxf/javascript/fortest/TestBean3.java
@@ -81,7 +81,7 @@ public class TestBean3 {
                 return false;
             }
         } else {
-            if (!base64Item.equals(other.base64Item)) {
+            if (!Arrays.equals(base64Item, other.base64Item)) {
                 return false;
             }
         }
diff --git a/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptorTest.java
b/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptorTest.java
index d2b74d3..a0e0347 100644
--- a/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptorTest.java
+++ b/rt/management/src/test/java/org/apache/cxf/management/interceptor/ResponseTimeMessageInInterceptorTest.java
@@ -164,6 +164,7 @@ public class ResponseTimeMessageInInterceptorTest extends AbstractMessageRespons
 
     }
 
+    @Test
     public void testIsClient() {
         Message message1 = null;
         Message message2 = new MessageImpl();
diff --git a/rt/management/src/test/java/org/apache/cxf/management/jmx/export/ModelMBeanAssemblerTest.java
b/rt/management/src/test/java/org/apache/cxf/management/jmx/export/ModelMBeanAssemblerTest.java
index ef37c13..2815237 100644
--- a/rt/management/src/test/java/org/apache/cxf/management/jmx/export/ModelMBeanAssemblerTest.java
+++ b/rt/management/src/test/java/org/apache/cxf/management/jmx/export/ModelMBeanAssemblerTest.java
@@ -176,8 +176,8 @@ public class ModelMBeanAssemblerTest extends  Assert {
     @Test
     public void testOperationInvocation() throws Exception {
         Object result = getServer().invoke(ton, "add",
-                                new Object[] {new Integer(20), new Integer(30)}, new String[]
{"int", "int"});
-        assertEquals("Incorrect result", new Integer(50), result);
+                                new Object[] {Integer.valueOf(20), Integer.valueOf(30)},
new String[] {"int", "int"});
+        assertEquals("Incorrect result", Integer.valueOf(50), result);
     }
 
     @Test
diff --git a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
index e34de1a..55acf61 100644
--- a/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
+++ b/rt/rs/description/src/test/java/org/apache/cxf/jaxrs/model/wadl/WadlGeneratorTest.java
@@ -861,7 +861,7 @@ public class WadlGeneratorTest extends Assert {
         }
 
         Param(String name, String type, String schemaType, String docs) {
-            this(name, type, schemaType, false, null);
+            this(name, type, schemaType, false, docs);
         }
 
 
diff --git a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomFeedProviderTest.java
b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomFeedProviderTest.java
index f29d620..74c1c37 100644
--- a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomFeedProviderTest.java
+++ b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/atom/AtomFeedProviderTest.java
@@ -50,6 +50,7 @@ public class AtomFeedProviderTest extends Assert {
 
     }
 
+    @Test
     public void testWriteTo() throws Exception {
         InputStream is = getClass().getResourceAsStream("atomFeed.xml");
         Feed simple = afd.readFrom(Feed.class, null, null, null, null, is);
diff --git a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JSONProviderTest.java
b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JSONProviderTest.java
index 89915c8..02e0ae8 100644
--- a/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JSONProviderTest.java
+++ b/rt/rs/extensions/providers/src/test/java/org/apache/cxf/jaxrs/provider/json/JSONProviderTest.java
@@ -212,6 +212,8 @@ public class JSONProviderTest extends Assert {
         assertEquals(expected, bos.toString());
     }
 
+    @Test
+    @org.junit.Ignore
     public void testWriteCollectionAsPureArray() throws Exception {
         JSONProvider<ReportDefinition> provider
             = new JSONProvider<ReportDefinition>();
diff --git a/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx2/server/StreamingAsyncSubscriber.java
b/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx2/server/StreamingAsyncSubscriber.java
index f9eafe4..3916878 100644
--- a/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx2/server/StreamingAsyncSubscriber.java
+++ b/rt/rs/extensions/rx/src/main/java/org/apache/cxf/jaxrs/rx2/server/StreamingAsyncSubscriber.java
@@ -41,7 +41,7 @@ public class StreamingAsyncSubscriber<T> extends AbstractAsyncSubscriber<T>
{
     private volatile boolean completed;
     private AtomicBoolean firstWriteDone = new AtomicBoolean();
     public StreamingAsyncSubscriber(AsyncResponse ar, String openTag, String closeTag, String
sep) {
-        this(ar, openTag, closeTag, "", 1000);
+        this(ar, openTag, closeTag, sep, 1000);
     }
     public StreamingAsyncSubscriber(AsyncResponse ar, String openTag, String closeTag, String
sep,
                                     long pollTimeout) {
diff --git a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
index 11cbc49..5c27cd9 100644
--- a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
+++ b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/jpa/JPACriteriaQueryVisitor.java
@@ -44,7 +44,7 @@ public class JPACriteriaQueryVisitor<T, E> extends AbstractJPATypedQueryVisitor<
                                    Class<T> tClass,
                                    Class<E> queryClass,
                                    List<String> joinProps) {
-        this(em, tClass, queryClass, null, null);
+        this(em, tClass, queryClass, null, joinProps);
     }
 
     public JPACriteriaQueryVisitor(EntityManager em,
diff --git a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/tika/TikaLuceneContentExtractor.java
b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/tika/TikaLuceneContentExtractor.java
index d2a7a28..21af2e9 100644
--- a/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/tika/TikaLuceneContentExtractor.java
+++ b/rt/rs/extensions/search/src/main/java/org/apache/cxf/jaxrs/ext/search/tika/TikaLuceneContentExtractor.java
@@ -74,7 +74,7 @@ public class TikaLuceneContentExtractor {
      */
     public TikaLuceneContentExtractor(final Parser parser,
                                       final LuceneDocumentMetadata documentMetadata) {
-        this(parser, false, new LuceneDocumentMetadata());
+        this(parser, false, documentMetadata);
     }
 
     /**
diff --git a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorFiqlTest.java
b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorFiqlTest.java
index 3e91a64..41a920f 100644
--- a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorFiqlTest.java
+++ b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorFiqlTest.java
@@ -342,8 +342,7 @@ public class JPATypedQueryVisitorFiqlTest extends AbstractJPATypedQueryVisitorTe
     public void testLessEqualQuery() throws Exception {
         List<Book> books = queryBooks("id=le=10");
         assertEquals(2, books.size());
-        assertTrue(9 == books.get(0).getId() && 10 == books.get(1).getId()
-            || 9 == books.get(0).getId() && 10 == books.get(1).getId());
+        assertTrue(9 == books.get(0).getId() && 10 == books.get(1).getId());
     }
 
     @Test
diff --git a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorODataTest.java
b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorODataTest.java
index 09cb75d..5cdc986 100644
--- a/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorODataTest.java
+++ b/rt/rs/extensions/search/src/test/java/org/apache/cxf/jaxrs/ext/search/jpa/JPATypedQueryVisitorODataTest.java
@@ -304,8 +304,7 @@ public class JPATypedQueryVisitorODataTest extends AbstractJPATypedQueryVisitorT
     public void testLessEqualQuery() throws Exception {
         List<Book> books = queryBooks("id le 10");
         assertEquals(2, books.size());
-        assertTrue(9 == books.get(0).getId() && 10 == books.get(1).getId()
-            || 9 == books.get(0).getId() && 10 == books.get(1).getId());
+        assertTrue(9 == books.get(0).getId() && 10 == books.get(1).getId());
     }
 
     @Test
diff --git a/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrant.java
b/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrant.java
index 325f8fb..5600d5a 100644
--- a/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrant.java
+++ b/rt/rs/security/oauth-parent/oauth2-saml/src/main/java/org/apache/cxf/rs/security/oauth2/grants/saml/Saml2BearerGrant.java
@@ -30,7 +30,7 @@ public class Saml2BearerGrant extends AbstractSaml2BearerGrant {
     }
 
     public Saml2BearerGrant(String assertion, boolean encoded) {
-        this(assertion, false, null);
+        this(assertion, encoded, null);
     }
 
     public Saml2BearerGrant(String assertion, String scope) {
diff --git a/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java
b/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java
index 94b628f..9f38537 100644
--- a/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java
+++ b/rt/transports/http/src/test/java/org/apache/cxf/transport/http/HTTPConduitURLEasyMockTest.java
@@ -169,6 +169,8 @@ public class HTTPConduitURLEasyMockTest extends Assert {
         return message;
     }
 
+    @Test
+    @org.junit.Ignore
     public void testSendWithHeadersCheckErrorStream() throws Exception {
         control = EasyMock.createNiceControl();
         HTTPConduit conduit = setUpConduit(true, false, "POST");
diff --git a/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
b/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
index e115356..8971d1c 100644
--- a/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
+++ b/rt/ws/addr/src/test/java/org/apache/cxf/ws/addressing/soap/MAPCodecTest.java
@@ -142,6 +142,7 @@ public class MAPCodecTest extends Assert {
         verifyMessage(message, false, true, false);
     }
 
+    @Test
     public void testRequestorOutbound() throws Exception {
         SoapMessage message = setUpMessage(true, true);
         codec.handleMessage(message);
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
index 402af61..465689a 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderActAsTest.java
@@ -200,12 +200,7 @@ public class SAMLProviderActAsTest extends org.junit.Assert {
         assertTrue(tokenString.contains("AttributeStatement"));
         assertTrue(tokenString.contains("bob"));
 
-        try {
-            assertTrue(tokenString.contains("CustomActAs"));
-            fail("Failure expected as the default AttributeProvider does not create this
attribute");
-        } catch (AssertionError ex) {
-            // expected on the wrong attribute provider
-        }
+        assertFalse(tokenString.contains("CustomActAs"));
 
         List<AttributeStatementProvider> customProviderList = new ArrayList<>();
         customProviderList.add(new CustomAttributeProvider());
diff --git a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java
b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java
index 460aee9..b4ed463 100644
--- a/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java
+++ b/services/sts/sts-core/src/test/java/org/apache/cxf/sts/token/provider/SAMLProviderOnBehalfOfTest.java
@@ -154,12 +154,7 @@ public class SAMLProviderOnBehalfOfTest extends org.junit.Assert {
         assertTrue(tokenString.contains("AttributeStatement"));
         assertTrue(tokenString.contains("bob"));
 
-        try {
-            assertTrue(tokenString.contains("CustomOnBehalfOf"));
-            fail("Failure expected as the default AttributeProvider does not create this
attribute");
-        } catch (AssertionError ex) {
-            // expected on the wrong attribute provider
-        }
+        assertFalse(tokenString.contains("CustomOnBehalfOf"));
 
         List<AttributeStatementProvider> customProviderList = new ArrayList<>();
         customProviderList.add(new CustomAttributeProvider());
diff --git a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java
b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java
index 017d41c..8825aa7 100644
--- a/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java
+++ b/services/sts/systests/advanced/src/test/java/org/apache/cxf/systest/sts/caching/ServerCachingTest.java
@@ -130,7 +130,7 @@ public class ServerCachingTest extends AbstractBusClientServerTestBase
{
         try {
             doubleIt(port, 30);
             fail("Failure expected as the STSClient on the server side is null");
-        } catch (Throwable ex) {
+        } catch (Exception ex) {
             // expected
         }
         // Try again using the original SAML token - this should work as it should be cached
by the service
diff --git a/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/X509UtilsTest.java
b/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/X509UtilsTest.java
index fc00233..b8fa0c3 100644
--- a/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/X509UtilsTest.java
+++ b/services/xkms/xkms-x509-handlers/src/test/java/org/apache/cxf/xkms/x509/utils/X509UtilsTest.java
@@ -36,6 +36,8 @@ import org.junit.Test;
 public class X509UtilsTest extends BasicValidationTest {
     private static final String CERT_DN = "CN=www.anothersts.com, L=CGN, ST=NRW, C=DE, O=AnotherSTS";
 
+    @Test
+    @org.junit.Ignore
     public void extractValidatingCertsOK() throws JAXBException {
         InputStream is = this.getClass().getResourceAsStream("/validateRequestOK.xml");
         @SuppressWarnings("unchecked")
diff --git a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/websocket/WebSocketTestClient.java
b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/websocket/WebSocketTestClient.java
index 7d0ce28..37eccf1 100644
--- a/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/websocket/WebSocketTestClient.java
+++ b/systests/transport-undertow/src/test/java/org/apache/cxf/systest/http_undertow/websocket/WebSocketTestClient.java
@@ -22,6 +22,7 @@ package org.apache.cxf.systest.http_undertow.websocket;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
@@ -134,7 +135,7 @@ class WebSocketTestClient {
         }
 
         public void onFragment(byte[] fragment, boolean last) {
-            LOG.info("[ws] received fragment bytes (last?" + last + ") --> " + fragment);
+            LOG.info("[ws] received fragment bytes (last?" + last + ") --> " + Arrays.toString(fragment));
             processFragments(fragment, last);
         }
 
diff --git a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
index c63b7f5..170b9c7 100644
--- a/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
+++ b/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java
@@ -344,7 +344,7 @@ public abstract class AbstractTypeTestClient
         BigInteger valueSets[][] = {{new BigInteger("0"), new BigInteger("1")},
                                     {new BigInteger("1"), new BigInteger("0")},
                                     {new BigInteger("0"),
-                                     new BigInteger(String.valueOf(Long.MAX_VALUE * Long.MAX_VALUE))}};
+                                     new BigInteger(String.valueOf(Long.MAX_VALUE))}};
 
         for (int i = 0; i < valueSets.length; i++) {
             BigInteger x = valueSets[i][0];
@@ -1146,8 +1146,8 @@ public abstract class AbstractTypeTestClient
             return;
         }
         BigInteger valueSets[][] = {{new BigInteger("-1234567890"), new BigInteger("1234567890")},
-                                    {new BigInteger("-" + String.valueOf(Long.MAX_VALUE *
Long.MAX_VALUE)),
-                                     new BigInteger(String.valueOf(Long.MAX_VALUE * Long.MAX_VALUE))}};
+                                    {new BigInteger("-" + String.valueOf(Long.MAX_VALUE)),
+                                     new BigInteger(String.valueOf(Long.MAX_VALUE))}};
 
         for (int i = 0; i < valueSets.length; i++) {
             BigInteger x = valueSets[i][0];
@@ -1177,8 +1177,8 @@ public abstract class AbstractTypeTestClient
             return;
         }
         BigInteger valueSets[][] = {{new BigInteger("1"), new BigInteger("1234567890")},
-                                    {new BigInteger(String.valueOf(Integer.MAX_VALUE * Integer.MAX_VALUE)),
-                                     new BigInteger(String.valueOf(Long.MAX_VALUE * Long.MAX_VALUE))}};
+                                    {new BigInteger(String.valueOf(Integer.MAX_VALUE)),
+                                     new BigInteger(String.valueOf(Long.MAX_VALUE))}};
 
         for (int i = 0; i < valueSets.length; i++) {
             BigInteger x = valueSets[i][0];
@@ -1273,10 +1273,8 @@ public abstract class AbstractTypeTestClient
         }
         BigInteger valueSets[][] = {{new BigInteger("0"),
                                         new BigInteger("1234567890")},
-                                    {new BigInteger(String.valueOf(Integer.MAX_VALUE
-                                                                   * Integer.MAX_VALUE)),
-                                     new BigInteger(String.valueOf(Long.MAX_VALUE
-                                                                   * Long.MAX_VALUE))}};
+                                    {new BigInteger(String.valueOf(Integer.MAX_VALUE)),
+                                     new BigInteger(String.valueOf(Long.MAX_VALUE))}};
 
         for (int i = 0; i < valueSets.length; i++) {
             BigInteger x = valueSets[i][0];
diff --git a/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/addr/WSAImpl2.java
b/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/addr/WSAImpl2.java
index 477657c..c4faa67 100644
--- a/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/addr/WSAImpl2.java
+++ b/tools/javato/ws/src/test/java/org/apache/cxf/tools/fortest/addr/WSAImpl2.java
@@ -40,7 +40,7 @@ public class WSAImpl2 {
     @Action(input = "inputAction", output = "outputAction")
     public int addNumbers(Holder<String> testname, int number1, int number2) {
         if (number1 < 0 || number2 < 0) {
-            new AddressingFeatureException("One of the numbers received was negative:"
+            throw new AddressingFeatureException("One of the numbers received was negative:"
                                            + number1 + ", " + number2);
         }
         return number1 + number2;
diff --git a/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
b/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
index 87df984..8914098 100644
--- a/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
+++ b/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/CodeGenTest.java
@@ -1125,6 +1125,7 @@ public class CodeGenTest extends AbstractCodeGenTest {
             env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/invalid_mep.wsdl"));
             processor.setContext(env);
             processor.execute();
+            fail("Failure expected");
         } catch (Exception e) {
             String expectedMsg = "Invalid WSDL, Operation notify in PortType "
                 + "{http://services.medial.com.br/echo}EchoNotification not request-response
or one-way";
@@ -1261,6 +1262,7 @@ public class CodeGenTest extends AbstractCodeGenTest {
             env.put(ToolConstants.CFG_VALIDATE_WSDL, ToolConstants.CFG_VALIDATE_WSDL);
             processor.setContext(env);
             processor.execute();
+            fail("Failure expected");
         } catch (Exception e) {
             boolean english = "en".equals(java.util.Locale.getDefault().getLanguage());
             if (english) {
@@ -1373,6 +1375,8 @@ public class CodeGenTest extends AbstractCodeGenTest {
         assertNotNull("GreetMe class from schema targetNamespace could not be found", tc);
     }
 
+    @Test
+    @org.junit.Ignore
     public void testW3CEPR() throws Exception {
         env.put(ToolConstants.CFG_WSDLURL, getLocation("/wsdl2java_wsdl/w3c-epr.wsdl"));
         processor.setContext(env);
diff --git a/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSContainerTest.java
b/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSContainerTest.java
index 582fd65..e7a2435 100644
--- a/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSContainerTest.java
+++ b/tools/wsdlto/test/src/test/java/org/apache/cxf/tools/wsdlto/jaxws/JAXWSContainerTest.java
@@ -222,6 +222,7 @@ public class JAXWSContainerTest extends ProcessorTestBase {
         }
     }
 
+    @Test
     public void testGetServceValidator() throws Exception {
         JAXWSContainer container = new JAXWSContainer(null);
         List<ServiceValidator> validators = container.getServiceValidators();

-- 
To stop receiving notification emails like this one, please contact
"commits@cxf.apache.org" <commits@cxf.apache.org>.

Mime
View raw message