File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
spring-core/src/main/java/org/springframework/core/env Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright 2002-2024 the original author or authors.
2+ * Copyright 2002-2025 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.
3434 *
3535 * <p>As of Spring 4.1.2, this class extends {@link EnumerablePropertySource} instead
3636 * of plain {@link PropertySource}, exposing {@link #getPropertyNames()} based on the
37- * accumulated property names from all contained sources (as far as possible).
37+ * accumulated property names from all contained sources - and failing with an
38+ * {@code IllegalStateException} against any non-{@code EnumerablePropertySource}.
39+ * <b>When used through the {@code EnumerablePropertySource} contract, all contained
40+ * sources are expected to be of type {@code EnumerablePropertySource} as well.</b>
3841 *
3942 * @author Chris Beams
4043 * @author Juergen Hoeller
You can’t perform that action at this time.
0 commit comments