File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
spring-boot/src/test/java/org/springframework/boot/bind Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -235,6 +235,14 @@ public void testBindNestedReadOnlyListIndexed() throws Exception {
235
235
assertEquals ("[bar, foo]" , target .getNested ().toString ());
236
236
}
237
237
238
+ @ Test
239
+ public void testBindDoubleNestedReadOnlyListIndexed () throws Exception {
240
+ TargetWithReadOnlyDoubleNestedList target = new TargetWithReadOnlyDoubleNestedList ();
241
+ this .conversionService = new DefaultConversionService ();
242
+ bind (target , "bean.nested[0]:bar\n bean.nested[1]:foo" );
243
+ assertEquals ("[bar, foo]" , target .getBean ().getNested ().toString ());
244
+ }
245
+
238
246
@ Test
239
247
public void testBindNestedReadOnlyCollectionIndexed () throws Exception {
240
248
TargetWithReadOnlyNestedCollection target = new TargetWithReadOnlyNestedCollection ();
@@ -561,6 +569,14 @@ public List<String> getNested() {
561
569
}
562
570
}
563
571
572
+ public static class TargetWithReadOnlyDoubleNestedList {
573
+ TargetWithReadOnlyNestedList bean = new TargetWithReadOnlyNestedList ();
574
+
575
+ public TargetWithReadOnlyNestedList getBean () {
576
+ return this .bean ;
577
+ }
578
+ }
579
+
564
580
public static class TargetWithReadOnlyNestedCollection {
565
581
private final Collection <String > nested = new ArrayList <String >();
566
582
You can’t perform that action at this time.
0 commit comments