Skip to content

Commit

Permalink
Document that MapPropertySource should not contain null values
Browse files Browse the repository at this point in the history
Closes gh-25142
  • Loading branch information
jhoeller committed May 29, 2020
1 parent bec89db commit ef626e9
Showing 1 changed file with 9 additions and 1 deletion.
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,6 +23,8 @@

/**
* {@link PropertySource} that reads keys and values from a {@code Map} object.
* The underlying map should not contain any {@code null} values in order to
* comply with {@link #getProperty} and {@link #containsProperty} semantics.
*
* @author Chris Beams
* @author Juergen Hoeller
Expand All @@ -31,6 +33,12 @@
*/
public class MapPropertySource extends EnumerablePropertySource<Map<String, Object>> {

/**
* Create a new {@code MapPropertySource} with the given name and {@code Map}.
* @param name the associated name
* @param source the Map source (without {@code null} values in order to get
* consistent {@link #getProperty} and {@link #containsProperty} behavior)
*/
public MapPropertySource(String name, Map<String, Object> source) {
super(name, source);
}
Expand Down

0 comments on commit ef626e9

Please sign in to comment.