change to argu exception to remove cycle dep
This commit is contained in:
parent
3031528134
commit
e4e6455b73
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue