[java-identity-provider COMMIT] /trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/context/navigate/Spr...
noreply at shibboleth.net
noreply at shibboleth.net
Mon Jun 9 21:52:25 EDT 2014
Author: scantor
Date: Mon Jun 9 21:52:25 2014
New Revision: 6067
URL: http://svn.shibboleth.net/view/java-identity-provider?rev=6067&view=rev
Log:
Allow for a null property.
Modified:
trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/context/navigate/SpringEventToViewLookupFunction.java
Modified: trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/context/navigate/SpringEventToViewLookupFunction.java
URL: http://svn.shibboleth.net/view/java-identity-provider/trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/context/navigate/SpringEventToViewLookupFunction.java?rev=6067&r1=6066&r2=6067&view=diff
==============================================================================
--- trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/context/navigate/SpringEventToViewLookupFunction.java (original)
+++ trunk/idp-profile-impl/src/main/java/net/shibboleth/idp/profile/context/navigate/SpringEventToViewLookupFunction.java Mon Jun 9 21:52:25 2014
@@ -63,14 +63,16 @@
* @param map map to use
*/
public void setEventMap(@Nonnull @NonnullElements Map<String,String> map) {
- Constraint.isNotNull(map, "Map cannot be null");
-
- eventMap = Maps.newHashMapWithExpectedSize(map.size());
- for (final Map.Entry<String,String> entry : map.entrySet()) {
- final String eventId = StringSupport.trimOrNull(entry.getKey());
- final String viewName = StringSupport.trimOrNull(entry.getValue());
- if (eventId != null && viewName != null) {
- eventMap.put(eventId, viewName);
+ if (map == null) {
+ eventMap = Collections.emptyMap();
+ } else {
+ eventMap = Maps.newHashMapWithExpectedSize(map.size());
+ for (final Map.Entry<String,String> entry : map.entrySet()) {
+ final String eventId = StringSupport.trimOrNull(entry.getKey());
+ final String viewName = StringSupport.trimOrNull(entry.getValue());
+ if (eventId != null && viewName != null) {
+ eventMap.put(eventId, viewName);
+ }
}
}
}
More information about the commits
mailing list