Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom converter validation failures #54

Open
cr3ativ3 opened this issue Mar 22, 2018 · 0 comments
Open

Custom converter validation failures #54

cr3ativ3 opened this issue Mar 22, 2018 · 0 comments

Comments

@cr3ativ3
Copy link
Contributor

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)
        ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant