cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ntimof...@apache.org
Subject cayenne git commit: Replace readonly Collections.singletonMap() with HashMap
Date Wed, 06 Sep 2017 13:02:25 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master b073b48bf -> 4a8eb1b06


Replace readonly Collections.singletonMap() with HashMap


Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/4a8eb1b0
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/4a8eb1b0
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/4a8eb1b0

Branch: refs/heads/master
Commit: 4a8eb1b06197ae828f2740635e7b5913c68a429b
Parents: b073b48
Author: Nikita Timofeev <stariy95@gmail.com>
Authored: Wed Sep 6 16:02:14 2017 +0300
Committer: Nikita Timofeev <stariy95@gmail.com>
Committed: Wed Sep 6 16:02:14 2017 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/cayenne/swing/TableBinding.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/4a8eb1b0/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/swing/TableBinding.java
----------------------------------------------------------------------
diff --git a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/swing/TableBinding.java
b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/swing/TableBinding.java
index efbd2f5..c48a8f4 100644
--- a/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/swing/TableBinding.java
+++ b/modeler/cayenne-modeler/src/main/java/org/apache/cayenne/swing/TableBinding.java
@@ -24,7 +24,7 @@ import java.awt.Component;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collection;
-import java.util.Collections;
+import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
@@ -152,7 +152,7 @@ public class TableBinding extends BindingBase {
 
         // this map is used as "flyweight", providing on the spot context for Ognl
         // expression evaluation
-        Map<String, Object> listContext = Collections.singletonMap(ITEM_VAR, null);
+        Map<String, Object> listContext = new HashMap<String, Object>(){{put(ITEM_VAR,
null);}};
 
         public int getColumnCount() {
             return headers.length;


Mime
View raw message