File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
main/java/org/springframework/beans/factory/config
test/java/org/springframework/beans/factory/config Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2002-2014 the original author or authors.
2+ * Copyright 2002-2015 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
4848 * environments.prod.name=My Cool App
4949 * </pre>
5050 *
51- * Lists are represented as comma-separated values (useful for simple String
52- * values) and also as property keys with <code>[]</code> dereferencers, for
51+ * Lists are split as property keys with <code>[]</code> dereferencers, for
5352 * example this YAML:
5453 *
5554 * <pre class="code">
6160 * becomes Java Properties like this:
6261 *
6362 * <pre class="code">
64- * servers=dev.bar.com,foo.bar.com
6563 * servers[0]=dev.bar.com
6664 * servers[1]=foo.bar.com
6765 * </pre>
Original file line number Diff line number Diff line change 11/*
2- * Copyright 2002-2014 the original author or authors.
2+ * Copyright 2002-2015 the original author or authors.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -215,6 +215,7 @@ public void testLoadArrayOfString() throws Exception {
215215 Properties properties = factory .getObject ();
216216 assertThat (properties .getProperty ("foo[0]" ), equalTo ("bar" ));
217217 assertThat (properties .getProperty ("foo[1]" ), equalTo ("baz" ));
218+ assertThat (properties .get ("foo" ), is (nullValue ()));
218219 }
219220
220221 @ Test
@@ -229,6 +230,7 @@ public void testLoadArrayOfObject() throws Exception {
229230 assertThat (properties .getProperty ("foo[1]" ), equalTo ("baz" ));
230231 assertThat (properties .getProperty ("foo[2].one" ), equalTo ("two" ));
231232 assertThat (properties .getProperty ("foo[2].three" ), equalTo ("four" ));
233+ assertThat (properties .get ("foo" ), is (nullValue ()));
232234 }
233235
234236 @ SuppressWarnings ("unchecked" )
You can’t perform that action at this time.
0 commit comments