freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [4/5] incubator-freemarker git commit: (Minor code cleanup)
Date Fri, 03 Mar 2017 21:19:51 GMT
(Minor code cleanup)


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

Branch: refs/heads/2.3-gae
Commit: df03e037cb6780a3c6919d08203c390f3f1a1817
Parents: 9f1fea3
Author: ddekany <ddekany@apache.org>
Authored: Fri Mar 3 11:35:33 2017 +0100
Committer: ddekany <ddekany@apache.org>
Committed: Fri Mar 3 11:35:33 2017 +0100

----------------------------------------------------------------------
 src/main/java/freemarker/ext/dom/NodeListModel.java | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/df03e037/src/main/java/freemarker/ext/dom/NodeListModel.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/ext/dom/NodeListModel.java b/src/main/java/freemarker/ext/dom/NodeListModel.java
index a18b4bc..a6a7534 100644
--- a/src/main/java/freemarker/ext/dom/NodeListModel.java
+++ b/src/main/java/freemarker/ext/dom/NodeListModel.java
@@ -57,7 +57,7 @@ class NodeListModel extends SimpleSequence implements TemplateHashModel,
_Unexpe
     NodeModel contextNode;
     XPathSupport xpathSupport;
     
-    private static ObjectWrapper nodeWrapper = new ObjectWrapper() {
+    private static final ObjectWrapper NODE_WRAPPER = new ObjectWrapper() {
         public TemplateModel wrap(Object obj) {
             if (obj instanceof NodeModel) {
                 return (NodeModel) obj;
@@ -71,12 +71,12 @@ class NodeListModel extends SimpleSequence implements TemplateHashModel,
_Unexpe
     }
     
     NodeListModel(NodeModel contextNode) {
-        super(nodeWrapper);
+        super(NODE_WRAPPER);
         this.contextNode = contextNode;
     }
     
     NodeListModel(NodeList nodeList, NodeModel contextNode) {
-        super(nodeWrapper);
+        super(NODE_WRAPPER);
         for (int i = 0; i < nodeList.getLength(); i++) {
             list.add(nodeList.item(i));
         }
@@ -84,7 +84,7 @@ class NodeListModel extends SimpleSequence implements TemplateHashModel,
_Unexpe
     }
     
     NodeListModel(NamedNodeMap nodeList, NodeModel contextNode) {
-        super(nodeWrapper);
+        super(NODE_WRAPPER);
         for (int i = 0; i < nodeList.getLength(); i++) {
             list.add(nodeList.item(i));
         }
@@ -92,7 +92,7 @@ class NodeListModel extends SimpleSequence implements TemplateHashModel,
_Unexpe
     }
     
     NodeListModel(List list, NodeModel contextNode) {
-        super(list, nodeWrapper);
+        super(list, NODE_WRAPPER);
         this.contextNode = contextNode;
     }
     


Mime
View raw message