From: Mathieu Baudier Date: Mon, 8 Dec 2008 20:11:16 +0000 (+0000) Subject: Fix cast issue X-Git-Tag: argeo-slc-2.1.7~2296 X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;ds=inline;h=cb0f78c49776106e6c1d6fd7990a352e46063442;p=gpl%2Fargeo-slc.git Fix cast issue ASSIGNED - bug 71: Extend capabilities of web services https://www.argeo.org/bugzilla/show_bug.cgi?id=71 git-svn-id: https://svn.argeo.org/slc/trunk@1966 4cfe0d0a-d680-48aa-b62c-e0a02a3f76cc --- diff --git a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java index d558083ec..b9dd33638 100644 --- a/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java +++ b/runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java @@ -33,12 +33,14 @@ public abstract class AbstractCastorTestCase extends AbstractSpringTestCase { return xml; } + @SuppressWarnings("unchecked") protected T unmarshal(StringResult xml) throws Exception { return (T) unmarshaller.unmarshal(new StringSource(xml.toString())); } + @SuppressWarnings("unchecked") protected T marshUnmarsh(Object obj) throws Exception { StringResult xml = marshalAndValidate(obj); - return unmarshal(xml); + return (T)unmarshal(xml); } }