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<Object>, MessageBodyWriter<Object> {
- private static Map<Class, JAXBContext> jaxbContexts = new WeakHashMap<Class,
JAXBContext>();
+ private static Map<Class<?>, JAXBContext> jaxbContexts
+ = new WeakHashMap<Class<?>, 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<DOMSource> 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<DOMSource> 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<Object> 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<SAXSource> 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<SAXSource> 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<StreamSource> 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<StreamSource> 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<Message> {
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<PolicyAssertion> as =
- CastUtils.cast((Collection)it.next(), PolicyAssertion.class);
+ for (Iterator<List<Assertion>> it = ep.getPolicy().getAlternatives();
it.hasNext();) {
+ Collection<Assertion> 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));
|