File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
framework-docs/modules/ROOT/pages/core/validation Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -316,9 +316,11 @@ Java::
316
316
317
317
List<Integer> input = ...
318
318
cs.convert(input,
319
- TypeDescriptor.forObject(input) , // List<Integer> type descriptor
320
- TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(String.class)));
319
+ TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(Integer.class)) , // <1>
320
+ TypeDescriptor.collection(List.class, TypeDescriptor.valueOf(String.class))); // <2>
321
321
----
322
+ <1> `List<Integer>` type descriptor
323
+ <2> `List<String>` type descriptor
322
324
323
325
Kotlin::
324
326
+
@@ -328,9 +330,11 @@ Kotlin::
328
330
329
331
val input: List<Integer> = ...
330
332
cs.convert(input,
331
- TypeDescriptor.forObject(input) , // List<Integer> type descriptor
332
- TypeDescriptor.collection(List::class.java, TypeDescriptor.valueOf(String::class.java)))
333
+ TypeDescriptor.collection(List::class.java, TypeDescriptor.valueOf(Integer::class.java)) , // <1>
334
+ TypeDescriptor.collection(List::class.java, TypeDescriptor.valueOf(String::class.java))) // <2>
333
335
----
336
+ <1> `List<Integer>` type descriptor
337
+ <2> `List<String>` type descriptor
334
338
======
335
339
336
340
Note that `DefaultConversionService` automatically registers converters that are
You can’t perform that action at this time.
0 commit comments