From e4e6455b73a75c2a38244ca63fc47c612a854c4d Mon Sep 17 00:00:00 2001 From: Willem Date: Fri, 13 May 2016 13:11:12 +0200 Subject: [PATCH] change to argu exception to remove cycle dep --- .../net/forwardfire/tpquery/model/ModelXMLMarshaller.java | 4 +--- .../net/forwardfire/tpquery/model/ModelXMLMarshallerTest.java | 3 +-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/ff-tpquery-store/src/main/java/net/forwardfire/tpquery/model/ModelXMLMarshaller.java b/ff-tpquery-store/src/main/java/net/forwardfire/tpquery/model/ModelXMLMarshaller.java index c4f6207..d330141 100644 --- a/ff-tpquery-store/src/main/java/net/forwardfire/tpquery/model/ModelXMLMarshaller.java +++ b/ff-tpquery-store/src/main/java/net/forwardfire/tpquery/model/ModelXMLMarshaller.java @@ -33,8 +33,6 @@ import javax.xml.bind.Unmarshaller; import org.apache.commons.lang3.Validate; -import net.forwardfire.tpquery.config.TPQConfigException; - /** * Jaxb model marshaller of the query sets. * @@ -63,7 +61,7 @@ public class ModelXMLMarshaller extends ModelXMLInfoSet { try { return JAXBContext.newInstance(classes); } catch (JAXBException e) { - throw new TPQConfigException(e); + throw new IllegalArgumentException(e); } }); } diff --git a/ff-tpquery-store/src/test/java/net/forwardfire/tpquery/model/ModelXMLMarshallerTest.java b/ff-tpquery-store/src/test/java/net/forwardfire/tpquery/model/ModelXMLMarshallerTest.java index 6972e42..27de65d 100644 --- a/ff-tpquery-store/src/test/java/net/forwardfire/tpquery/model/ModelXMLMarshallerTest.java +++ b/ff-tpquery-store/src/test/java/net/forwardfire/tpquery/model/ModelXMLMarshallerTest.java @@ -16,7 +16,6 @@ import org.junit.Test; import net.forwardfire.tpquery.TPQFactory; import net.forwardfire.tpquery.TPQManager; -import net.forwardfire.tpquery.config.TPQConfigException; import net.forwardfire.tpquery.model.TPQuery; import net.forwardfire.tpquery.model.TPQueryParameter; import net.forwardfire.tpquery.model.TPQuerySet; @@ -118,7 +117,7 @@ public class ModelXMLMarshallerTest { assertEquals("false",q.getQueryHints().get("junit")); } - @Test(expected=TPQConfigException.class) + @Test(expected=IllegalArgumentException.class) public void testContextException() throws Exception { new ModelXMLMarshaller(JaxbContextError.class); }