From commits-return-17463-apmail-cxf-commits-archive=cxf.apache.org@cxf.apache.org Fri Jan 6 15:30:06 2012 Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 99172B283 for ; Fri, 6 Jan 2012 15:30:06 +0000 (UTC) Received: (qmail 88216 invoked by uid 500); 6 Jan 2012 15:30:06 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 88116 invoked by uid 500); 6 Jan 2012 15:30:05 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 88109 invoked by uid 99); 6 Jan 2012 15:30:05 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jan 2012 15:30:05 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 06 Jan 2012 15:30:04 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id AAB3323889DA for ; Fri, 6 Jan 2012 15:29:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1228231 - in /cxf/trunk/systests: jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/ jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/ jaxws/src/test/java/org/apache/cxf/systest/dispatch/ uncategorized/src/test/java/org/apache/cxf/... Date: Fri, 06 Jan 2012 15:29:43 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120106152943.AAB3323889DA@eris.apache.org> Author: dkulp Date: Fri Jan 6 15:29:42 2012 New Revision: 1228231 URL: http://svn.apache.org/viewvc?rev=1228231&view=rev Log: Systest warning fixes that can be ported back Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BadgerFishProvider.java cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/FailoverAddressOverrideTest.java cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/PolicyLoggingInterceptor.java Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BadgerFishProvider.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BadgerFishProvider.java?rev=1228231&r1=1228230&r2=1228231&view=diff ============================================================================== --- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BadgerFishProvider.java (original) +++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/BadgerFishProvider.java Fri Jan 6 15:29:42 2012 @@ -57,7 +57,8 @@ public final class BadgerFishProvider implements MessageBodyReader, MessageBodyWriter { - private static Map jaxbContexts = new WeakHashMap(); + private static Map, JAXBContext> jaxbContexts + = new WeakHashMap, JAXBContext>(); @Context private HttpHeaders requestHeaders; @@ -115,7 +116,7 @@ public final class BadgerFishProvider } } - private JAXBContext getJAXBContext(Class type) throws JAXBException { + private JAXBContext getJAXBContext(Class type) throws JAXBException { synchronized (jaxbContexts) { JAXBContext context = jaxbContexts.get(type); if (context == null) { Modified: cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java?rev=1228231&r1=1228230&r2=1228231&view=diff ============================================================================== --- cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java (original) +++ cxf/trunk/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/FailoverTest.java Fri Jan 6 15:29:42 2012 @@ -316,7 +316,7 @@ public class FailoverTest extends Abstra } - protected void verifyStrategy(Object proxy, Class clz) { + protected void verifyStrategy(Object proxy, Class clz) { ConduitSelector conduitSelector = WebClient.getConfig(proxy).getConduitSelector(); if (conduitSelector instanceof FailoverTargetSelector) { Modified: cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java?rev=1228231&r1=1228230&r2=1228231&view=diff ============================================================================== --- cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java (original) +++ cxf/trunk/systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java Fri Jan 6 15:29:42 2012 @@ -396,8 +396,8 @@ public class DispatchClientServerTest ex DOMSource domReqMsg2 = new DOMSource(soapReqMsg2.getSOAPPart()); assertNotNull(domReqMsg2); - Response response = disp.invokeAsync(domReqMsg2); - DOMSource domRespMsg2 = (DOMSource)response.get(); + Response response = disp.invokeAsync(domReqMsg2); + DOMSource domRespMsg2 = response.get(); assertNotNull(domReqMsg2); String expected2 = "Hello TestSOAPInputMessage2"; assertEquals("Response should be : Hello TestSOAPInputMessage2", expected2, domRespMsg2.getNode() @@ -410,7 +410,7 @@ public class DispatchClientServerTest ex assertNotNull(domReqMsg3); TestDOMSourceHandler tdsh = new TestDOMSourceHandler(); - Future fd = disp.invokeAsync(domReqMsg3, tdsh); + Future fd = disp.invokeAsync(domReqMsg3, tdsh); assertNotNull(fd); waitForFuture(fd); String expected3 = "Hello TestSOAPInputMessage3"; @@ -466,8 +466,8 @@ public class DispatchClientServerTest ex DOMSource domReqMsg2 = new DOMSource(soapReqMsg2.getSOAPBody().extractContentAsDocument()); assertNotNull(domReqMsg2); // invokeAsync - Response response = disp.invokeAsync(domReqMsg2); - DOMSource domRespMsg2 = (DOMSource)response.get(); + Response response = disp.invokeAsync(domReqMsg2); + DOMSource domRespMsg2 = response.get(); assertNotNull(domRespMsg2); String expected2 = "Hello TestSOAPInputMessage2"; @@ -487,7 +487,7 @@ public class DispatchClientServerTest ex assertNotNull(domReqMsg3); // invokeAsync with AsyncHandler TestDOMSourceHandler tdsh = new TestDOMSourceHandler(); - Future fd = disp.invokeAsync(domReqMsg3, tdsh); + Future fd = disp.invokeAsync(domReqMsg3, tdsh); assertNotNull(fd); waitForFuture(fd); String expected3 = "Hello TestSOAPInputMessage3"; @@ -523,7 +523,7 @@ public class DispatchClientServerTest ex disp.invokeOneWay(greetMe); // Test async polling - Response response2 = disp.invokeAsync(greetMe); + Response response2 = disp.invokeAsync(greetMe); assertNotNull(response2); GreetMeResponse greetMeResponse = (GreetMeResponse)response2.get(); String responseValue2 = greetMeResponse.getResponseType(); @@ -531,7 +531,7 @@ public class DispatchClientServerTest ex // Test async callback TestJAXBHandler tjbh = new TestJAXBHandler(); - Future fd = disp.invokeAsync(greetMe, tjbh); + Future fd = disp.invokeAsync(greetMe, tjbh); assertNotNull(fd); waitForFuture(fd); @@ -663,8 +663,8 @@ public class DispatchClientServerTest ex SAXSource saxSourceReq2 = new SAXSource(inputSource2); assertNotNull(saxSourceReq2); - Response response = disp.invokeAsync(saxSourceReq2); - SAXSource saxSourceResp2 = (SAXSource)response.get(); + Response response = disp.invokeAsync(saxSourceReq2); + SAXSource saxSourceResp2 = response.get(); assertNotNull(saxSourceResp2); String expected2 = "Hello TestSOAPInputMessage2"; assertTrue("Expected: " + expected, XMLUtils.toString(saxSourceResp2).contains(expected2)); @@ -675,7 +675,7 @@ public class DispatchClientServerTest ex SAXSource saxSourceReq3 = new SAXSource(inputSource3); assertNotNull(saxSourceReq3); TestSAXSourceHandler tssh = new TestSAXSourceHandler(); - Future fd = disp.invokeAsync(saxSourceReq3, tssh); + Future fd = disp.invokeAsync(saxSourceReq3, tssh); assertNotNull(fd); waitForFuture(fd); @@ -731,8 +731,8 @@ public class DispatchClientServerTest ex inputSource2.setSystemId(inputSource2.getPublicId()); SAXSource saxSourceReq2 = new SAXSource(inputSource2); assertNotNull(saxSourceReq2); - Response response = disp.invokeAsync(saxSourceReq2); - SAXSource saxSourceResp2 = (SAXSource)response.get(); + Response response = disp.invokeAsync(saxSourceReq2); + SAXSource saxSourceResp2 = response.get(); assertNotNull(saxSourceResp2); String expected2 = "Hello TestSOAPInputMessage2"; assertTrue("Expected: " + expected, XMLUtils.toString(saxSourceResp2).contains(expected2)); @@ -747,7 +747,7 @@ public class DispatchClientServerTest ex assertNotNull(saxSourceReq3); TestSAXSourceHandler tssh = new TestSAXSourceHandler(); - Future fd = disp.invokeAsync(saxSourceReq3, tssh); + Future fd = disp.invokeAsync(saxSourceReq3, tssh); assertNotNull(fd); waitForFuture(fd); @@ -787,8 +787,8 @@ public class DispatchClientServerTest ex InputStream is2 = getClass().getResourceAsStream("resources/GreetMeDocLiteralReq2.xml"); StreamSource streamSourceReq2 = new StreamSource(is2); assertNotNull(streamSourceReq2); - Response response = disp.invokeAsync(streamSourceReq2); - StreamSource streamSourceResp2 = (StreamSource)response.get(); + Response response = disp.invokeAsync(streamSourceReq2); + StreamSource streamSourceResp2 = response.get(); assertNotNull(streamSourceResp2); String expected2 = "Hello TestSOAPInputMessage2"; assertTrue("Expected: " + expected, XMLUtils.toString(streamSourceResp2).contains(expected2)); @@ -797,7 +797,7 @@ public class DispatchClientServerTest ex StreamSource streamSourceReq3 = new StreamSource(is3); assertNotNull(streamSourceReq3); TestStreamSourceHandler tssh = new TestStreamSourceHandler(); - Future fd = disp.invokeAsync(streamSourceReq3, tssh); + Future fd = disp.invokeAsync(streamSourceReq3, tssh); assertNotNull(fd); waitForFuture(fd); @@ -839,8 +839,8 @@ public class DispatchClientServerTest ex InputStream is2 = getClass().getResourceAsStream("resources/GreetMeDocLiteralSOAPBodyReq2.xml"); StreamSource streamSourceReq2 = new StreamSource(is2); assertNotNull(streamSourceReq2); - Response response = disp.invokeAsync(streamSourceReq2); - StreamSource streamSourceResp2 = (StreamSource)response.get(); + Response response = disp.invokeAsync(streamSourceReq2); + StreamSource streamSourceResp2 = response.get(); assertNotNull(streamSourceResp2); String expected2 = "Hello TestSOAPInputMessage2"; assertTrue("Expected: " + expected, XMLUtils.toString(streamSourceResp2).contains(expected2)); @@ -851,7 +851,7 @@ public class DispatchClientServerTest ex assertNotNull(streamSourceReq3); TestStreamSourceHandler tssh = new TestStreamSourceHandler(); - Future fd = disp.invokeAsync(streamSourceReq3, tssh); + Future fd = disp.invokeAsync(streamSourceReq3, tssh); assertNotNull(fd); waitForFuture(fd); Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/FailoverAddressOverrideTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/FailoverAddressOverrideTest.java?rev=1228231&r1=1228230&r2=1228231&view=diff ============================================================================== --- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/FailoverAddressOverrideTest.java (original) +++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/FailoverAddressOverrideTest.java Fri Jan 6 15:29:42 2012 @@ -220,7 +220,7 @@ public class FailoverAddressOverrideTest instanceof FailoverTargetSelector); } - protected void verifyStrategy(Object proxy, Class clz, int count) { + protected void verifyStrategy(Object proxy, Class clz, int count) { ConduitSelector conduitSelector = ClientProxy.getClient(proxy).getConduitSelector(); if (conduitSelector instanceof FailoverTargetSelector) { Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java?rev=1228231&r1=1228230&r2=1228231&view=diff ============================================================================== --- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java (original) +++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/clustering/FailoverTest.java Fri Jan 6 15:29:42 2012 @@ -407,7 +407,7 @@ public class FailoverTest extends Abstra updateWsdlExtensors("9053", PORT_C); } - protected void verifyStrategy(Object proxy, Class clz) { + protected void verifyStrategy(Object proxy, Class clz) { ConduitSelector conduitSelector = ClientProxy.getClient(proxy).getConduitSelector(); if (conduitSelector instanceof FailoverTargetSelector) { Modified: cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java?rev=1228231&r1=1228230&r2=1228231&view=diff ============================================================================== --- cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java (original) +++ cxf/trunk/systests/uncategorized/src/test/java/org/apache/cxf/systest/type_test/AbstractTypeTestClient.java Fri Jan 6 15:29:42 2012 @@ -67,7 +67,7 @@ public abstract class AbstractTypeTestCl return true; } - public static void initClient(Class clz, QName serviceName, + public static void initClient(Class clz, QName serviceName, QName portName, String wsdlPath) throws Exception { URL wsdlLocation = clz.getResource(wsdlPath); Modified: cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/PolicyLoggingInterceptor.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/PolicyLoggingInterceptor.java?rev=1228231&r1=1228230&r2=1228231&view=diff ============================================================================== --- cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/PolicyLoggingInterceptor.java (original) +++ cxf/trunk/systests/ws-specs/src/test/java/org/apache/cxf/systest/ws/policy/PolicyLoggingInterceptor.java Fri Jan 6 15:29:42 2012 @@ -21,12 +21,12 @@ package org.apache.cxf.systest.ws.policy import java.util.Collection; import java.util.Iterator; +import java.util.List; import java.util.logging.Logger; import org.apache.cxf.Bus; import org.apache.cxf.common.logging.LogUtils; import org.apache.cxf.endpoint.Endpoint; -import org.apache.cxf.helpers.CastUtils; import org.apache.cxf.interceptor.Fault; import org.apache.cxf.message.Message; import org.apache.cxf.phase.AbstractPhaseInterceptor; @@ -36,11 +36,11 @@ import org.apache.cxf.service.model.Endp import org.apache.cxf.transport.http.policy.PolicyUtils; import org.apache.cxf.transports.http.configuration.HTTPServerPolicy; import org.apache.cxf.ws.policy.EffectivePolicy; -import org.apache.cxf.ws.policy.PolicyAssertion; import org.apache.cxf.ws.policy.PolicyEngine; import org.apache.cxf.ws.policy.builder.jaxb.JaxbAssertion; +import org.apache.neethi.Assertion; -public class PolicyLoggingInterceptor extends AbstractPhaseInterceptor { +public class PolicyLoggingInterceptor extends AbstractPhaseInterceptor { private static final Logger LOG = LogUtils.getLogger(PolicyLoggingInterceptor.class); @@ -61,11 +61,10 @@ public class PolicyLoggingInterceptor ex + " and binding operation " + boi); EffectivePolicy ep = bus.getExtension(PolicyEngine.class).getEffectiveServerRequestPolicy(ei, boi); - for (Iterator it = ep.getPolicy().getAlternatives(); it.hasNext();) { - Collection as = - CastUtils.cast((Collection)it.next(), PolicyAssertion.class); + for (Iterator> it = ep.getPolicy().getAlternatives(); it.hasNext();) { + Collection as = it.next(); LOG.fine("Checking alternative with " + as.size() + " assertions."); - for (PolicyAssertion a : as) { + for (Assertion a : as) { LOG.fine("Assertion: " + a.getClass().getName()); HTTPServerPolicy p = (JaxbAssertion.cast(a, HTTPServerPolicy.class)).getData(); LOG.fine("server policy: " + PolicyUtils.toString(p));