freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject incubator-freemarker git commit: (Removed redundant condition)
Date Wed, 05 Apr 2017 09:24:46 GMT
Repository: incubator-freemarker
Updated Branches:
  refs/heads/2.3-gae 1250faf0b -> fa56e73ff


(Removed redundant condition)


Project: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/commit/fa56e73f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/fa56e73f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/fa56e73f

Branch: refs/heads/2.3-gae
Commit: fa56e73ffc26e126da73b115b82b82dc49bbdf8e
Parents: 1250faf
Author: ddekany <ddekany@apache.org>
Authored: Wed Apr 5 11:24:40 2017 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Wed Apr 5 11:24:40 2017 +0200

----------------------------------------------------------------------
 src/main/java/freemarker/core/TemplateConfiguration.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/fa56e73f/src/main/java/freemarker/core/TemplateConfiguration.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/core/TemplateConfiguration.java b/src/main/java/freemarker/core/TemplateConfiguration.java
index e79bcab..0569890 100644
--- a/src/main/java/freemarker/core/TemplateConfiguration.java
+++ b/src/main/java/freemarker/core/TemplateConfiguration.java
@@ -643,8 +643,8 @@ public final class TemplateConfiguration extends Configurable implements
ParserC
     private Map mergeMaps(Map m1, Map m2, boolean overwriteUpdatesOrder) {
         if (m1 == null) return m2;
         if (m2 == null) return m1;
-        if (m1.isEmpty()) return m2 != null ? m2 : m1;
-        if (m2.isEmpty()) return m1 != null ? m1 : m2;
+        if (m1.isEmpty()) return m2;
+        if (m2.isEmpty()) return m1;
         
         LinkedHashMap mergedM = new LinkedHashMap((m1.size() + m2.size()) * 4 / 3 + 1, 0.75f);
         mergedM.putAll(m1);
@@ -658,8 +658,8 @@ public final class TemplateConfiguration extends Configurable implements
ParserC
     private List<String> mergeLists(List<String> list1, List<String> list2)
{
         if (list1 == null) return list2;
         if (list2 == null) return list1;
-        if (list1.isEmpty()) return list2 != null ? list2 : list1;
-        if (list2.isEmpty()) return list1 != null ? list1 : list2;
+        if (list1.isEmpty()) return list2;
+        if (list2.isEmpty()) return list1;
         
         ArrayList<String> mergedList = new ArrayList<String>(list1.size() + list2.size());
         mergedList.addAll(list1);


Mime
View raw message