-
Notifications
You must be signed in to change notification settings - Fork 38.4k
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
List-to-String conversion exception does not refer to element type [SPR-14971] #19537
Comments
Jaro Kuruc commented Hi Juergen, we have also observed a behaviour with possible room for an improvement. Let me describe our use case. With our custom converter converting But then with the same converter in place, when we try to use |
Juergen Hoeller commented As for the original report, a In general, there are no guarantees for a successful conversion attempt after a positive That said, there is definitely an issue here with our element type descriptor: Its |
Juergen Hoeller commented Jaro Kuruc, how specifically do you expand a |
Luca Burgazzoli commented I agree that canConvert may be lazy but then there is another issue while converting objects to string which is not clear to me: FallbackObjectToStringConverter will be invoked if no converters are found for the given collection element and it has a match condition which includes ObjectToObjectConverter.hasConversionMethodOrConstructor so it requires that an object to be convertible to a string needs to support the opposite operation (string --> object), is that correct ? |
Juergen Hoeller commented Indeed, in trying to identify classes with proper conversion-like Of course, if you just need the output for logging purposes of the like, you can simply bypass the |
Luca Burgazzoli opened SPR-14971 and commented
I'm leveraging ConversionService to convert from different types and I found out an issue related to a conversion from a List of POJO to String.
The issue are:
Affects: 4.2.8, 4.3.4
Reference URL: spring-attic/spring-framework-issues#142
Referenced from: commits 442d8a6, bcdda91, aef1460
Backported to: 4.2.9
The text was updated successfully, but these errors were encountered: