jspoon
jspoon copied to clipboard
Custom converter validation failures
HtmlFieldWithConverter.class has the following code to check the declared converter:
if (converterClass.equals(ElementConverter.class)){
throw new IllegalArgumentException("Expecting a concrete type of " + ElementConverter.class);
}
But that fails to catch any case where interface InterfaceConverter<T> extends ElementConverter<T> that results in either
pl.droidsonroids.jspoon.exception.ConstructorNotFoundException: Default constructor for class EmptyConverter not found.
at pl.droidsonroids.jspoon.Utils.constructInstance(Utils.java:46)
...
or abstract class AbstractConverter<T> implements ElementConverter<T> throws
pl.droidsonroids.jspoon.exception.ObjectCreationException: Error while creating instance of InterfaceConverter.
at pl.droidsonroids.jspoon.Utils.constructInstance(Utils.java:48)
...