I have an AttributeConverter which convert Set<String> to comma separated string.
It's works with:
And I wish it works with:
But it will throw ClassCastException:
This is not a correct behavior. If you ran all tests against your change proposal, you would find that some tests are failing because we might want to have converters like AttributeConverter<Integer, Integer>, in which case your change will no longer work.
In any query, you need to pass the actual type of the property in question. The reason why you get this issue is because you are not using the Converter as it was designed to be used.
You are right, and my request is reasonable too. here is my proposal, catching ClassCastException and skip conversion, it will not break current behaviour.