@@ -92,6 +92,8 @@ public PropertySource(String name) {
92
92
93
93
/**
94
94
* Return the name of this {@code PropertySource}.
95
+ * <p>See the {@linkplain PropertySource class-level Javadoc} for details
96
+ * on property source identity and names.
95
97
*/
96
98
public String getName () {
97
99
return this .name ;
@@ -170,21 +172,22 @@ public String toString() {
170
172
171
173
172
174
/**
173
- * Return a {@code PropertySource} implementation intended for collection comparison purposes only.
174
- * <p>Primarily for internal use, but given a collection of {@code PropertySource} objects, may be
175
- * used as follows:
175
+ * Return a {@code PropertySource} implementation intended for collection
176
+ * comparison purposes only.
177
+ * <p>Primarily for internal use, but given a collection of {@code PropertySource}
178
+ * objects, may be used as follows:
176
179
* <pre class="code">
177
- * {@code List< PropertySource<?>> sources = new ArrayList<PropertySource<?>> ();
180
+ * List< PropertySource<?>> sources = new ArrayList<> ();
178
181
* sources.add(new MapPropertySource("sourceA", mapA));
179
182
* sources.add(new MapPropertySource("sourceB", mapB));
180
183
* assert sources.contains(PropertySource.named("sourceA"));
181
184
* assert sources.contains(PropertySource.named("sourceB"));
182
- * assert !sources.contains(PropertySource.named("sourceC"));
183
- * }</pre>
184
- * The returned {@code PropertySource} will throw {@code UnsupportedOperationException}
185
+ * assert !sources.contains(PropertySource.named("sourceC"));</pre>
186
+ * <p>The returned {@code PropertySource} will throw {@code UnsupportedOperationException}
185
187
* if any methods other than {@code equals(Object)}, {@code hashCode()}, and {@code toString()}
186
188
* are called.
187
- * @param name the name of the comparison {@code PropertySource} to be created and returned.
189
+ * @param name the name of the comparison {@code PropertySource} to be created
190
+ * and returned
188
191
*/
189
192
public static PropertySource <?> named (String name ) {
190
193
return new ComparisonPropertySource (name );
@@ -206,7 +209,7 @@ public static PropertySource<?> named(String name) {
206
209
public static class StubPropertySource extends PropertySource <Object > {
207
210
208
211
public StubPropertySource (String name ) {
209
- super (name , new Object () );
212
+ super (name );
210
213
}
211
214
212
215
/**
0 commit comments