change to argu exception to remove cycle dep

This commit is contained in:
Willem 2016-05-13 13:11:12 +02:00
parent 3031528134
commit e4e6455b73
2 changed files with 2 additions and 5 deletions

View file

@ -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);
}
});
}

View file

@ -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);
}