Commit ca4c11e0 authored by Piotr Gawron's avatar Piotr Gawron
Browse files

converter must be created when required (problem with concurrent access)

parent 566cf0f3
......@@ -311,7 +311,11 @@ public abstract class BaseRestImpl {
protected Converter getModelParser(String handlerClass) throws QueryException {
for (Converter converter : getModelConverters()) {
if (converter.getClass().getCanonicalName().equals(handlerClass)) {
return converter;
try {
return (Converter) Class.forName(handlerClass).newInstance();
} catch (InstantiationException | IllegalAccessException | ClassNotFoundException e) {
throw new QueryException("Problem with handler:" + handlerClass);
}
}
}
throw new QueryException("Unknown handlerClass: " + handlerClass);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment