Ard Schrijvers pushed to branch master at cms-community / hippo-site-toolkit


Commits:
8e0ef1f6 by Ard Schrijvers at 2016-06-06T13:21:01+02:00
HSTTWO-3692 only add param if key and value *NOT* null

- - - - -


1 changed file:

- 
components/core/src/main/java/org/hippoecm/hst/core/linking/LocationMapResolver.java


Changes:

=====================================
components/core/src/main/java/org/hippoecm/hst/core/linking/LocationMapResolver.java
=====================================
--- 
a/components/core/src/main/java/org/hippoecm/hst/core/linking/LocationMapResolver.java
+++ 
b/components/core/src/main/java/org/hippoecm/hst/core/linking/LocationMapResolver.java
@@ -193,14 +193,14 @@ public class LocationMapResolver {
             if(keyToPropertyPlaceHolderMap.containsKey(entry.getKey())) {
                 // translate key1 -> n1, key2 -> n2 etc
                 final String key = 
keyToPropertyPlaceHolderMap.get(entry.getKey());
-                if (key == null || entry.getValue() == null) {
+                if (key != null && entry.getValue() != null) {
                     params.put(key, entry.getValue());
                 }
             } else {
                 if(!keyToPropertyPlaceHolderMap.containsValue(entry.getKey())) 
{
                     // inherited params from current ctx: when the 
keyToPropertyPlaceHolderMap contains the entry.getKey() as value,
                     // the param is already mapped.
-                    if (entry.getKey() == null || entry.getValue() == null) {
+                    if (entry.getKey() != null && entry.getValue() != null) {
                         params.put(entry.getKey(), entry.getValue());
                     }
                 }



View it on GitLab: 
https://code.onehippo.org/cms-community/hippo-site-toolkit/commit/8e0ef1f68cd6494eb412ff481c98c36f248cd303
_______________________________________________
Hippocms-svn mailing list
Hippocms-svn@lists.onehippo.org
https://lists.onehippo.org/mailman/listinfo/hippocms-svn

Reply via email to