Fix cast issue
authorMathieu Baudier <mbaudier@argeo.org>
Mon, 8 Dec 2008 20:11:16 +0000 (20:11 +0000)
committerMathieu Baudier <mbaudier@argeo.org>
Mon, 8 Dec 2008 20:11:16 +0000 (20:11 +0000)
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

runtime/org.argeo.slc.support.castor/src/test/java/org/argeo/slc/castor/AbstractCastorTestCase.java

index d558083ec5b4638b3baaac99fd042145a7e920f3..b9dd33638b604a66c4ba1f202c7d56e925317cb7 100644 (file)
@@ -33,12 +33,14 @@ public abstract class AbstractCastorTestCase extends AbstractSpringTestCase {
                return xml;
        }
 
+       @SuppressWarnings("unchecked")
        protected <T> T unmarshal(StringResult xml) throws Exception {
                return (T) unmarshaller.unmarshal(new StringSource(xml.toString()));
        }
 
+       @SuppressWarnings("unchecked")
        protected <T> T marshUnmarsh(Object obj) throws Exception {
                StringResult xml = marshalAndValidate(obj);
-               return unmarshal(xml);
+               return (T)unmarshal(xml);
        }
 }