freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [1/2] incubator-freemarker git commit: (Some code cleanup)
Date Sun, 08 Oct 2017 21:57:36 GMT
Repository: incubator-freemarker
Updated Branches:
  refs/heads/2.3-gae 15b97afa5 -> d2a26061e


(Some 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/031762b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/tree/031762b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-freemarker/diff/031762b0

Branch: refs/heads/2.3-gae
Commit: 031762b0e272851f048d63b5fccf2a1bef73d0bd
Parents: 15b97af
Author: ddekany <ddekany@apache.org>
Authored: Sun Oct 8 23:56:34 2017 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Sun Oct 8 23:56:46 2017 +0200

----------------------------------------------------------------------
 src/main/java/freemarker/ext/beans/UnsafeMethods.java | 5 ++---
 src/main/java/freemarker/ext/jsp/TaglibFactory.java   | 6 +++---
 src/main/java/freemarker/template/Configuration.java  | 1 +
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/031762b0/src/main/java/freemarker/ext/beans/UnsafeMethods.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/ext/beans/UnsafeMethods.java b/src/main/java/freemarker/ext/beans/UnsafeMethods.java
index c7b5f46..249a6c1 100644
--- a/src/main/java/freemarker/ext/beans/UnsafeMethods.java
+++ b/src/main/java/freemarker/ext/beans/UnsafeMethods.java
@@ -22,7 +22,6 @@ package freemarker.ext.beans;
 import java.lang.reflect.Method;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
@@ -46,9 +45,9 @@ class UnsafeMethods {
             Properties props = ClassUtil.loadProperties(BeansWrapper.class, UNSAFE_METHODS_PROPERTIES);
             Set set = new HashSet(props.size() * 4 / 3, 1f);
             Map primClasses = createPrimitiveClassesMap();
-            for (Iterator iterator = props.keySet().iterator(); iterator.hasNext(); ) {
+            for (Object key : props.keySet()) {
                 try {
-                    set.add(parseMethodSpec((String) iterator.next(), primClasses));
+                    set.add(parseMethodSpec((String) key, primClasses));
                 } catch (ClassNotFoundException e) {
                     if (ClassIntrospector.DEVELOPMENT_MODE) {
                         throw e;

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/031762b0/src/main/java/freemarker/ext/jsp/TaglibFactory.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/ext/jsp/TaglibFactory.java b/src/main/java/freemarker/ext/jsp/TaglibFactory.java
index de4bcf3..909a372 100644
--- a/src/main/java/freemarker/ext/jsp/TaglibFactory.java
+++ b/src/main/java/freemarker/ext/jsp/TaglibFactory.java
@@ -1257,9 +1257,9 @@ public class TaglibFactory implements TemplateHashModel {
         public InputStream getInputStream() throws IOException {
             ClassLoader tccl = tryGetThreadContextClassLoader();
             if (tccl != null) {
-                InputStream r = ClassUtil.getReasourceAsStream(tccl, resourcePath, true);
-                if (r != null) {
-                    return r;
+                InputStream ins = ClassUtil.getReasourceAsStream(tccl, resourcePath, true);
+                if (ins != null) {
+                    return ins;
                 }
             }
             

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/031762b0/src/main/java/freemarker/template/Configuration.java
----------------------------------------------------------------------
diff --git a/src/main/java/freemarker/template/Configuration.java b/src/main/java/freemarker/template/Configuration.java
index d4d6863..8dc77a2 100644
--- a/src/main/java/freemarker/template/Configuration.java
+++ b/src/main/java/freemarker/template/Configuration.java
@@ -435,6 +435,7 @@ public class Configuration extends Configurable implements Cloneable,
ParserConf
     static {
         try {
             Properties props = ClassUtil.loadProperties(Configuration.class, VERSION_PROPERTIES_PATH);
+            
             String versionString  = getRequiredVersionProperty(props, "version");
             
             Date buildDate;


Mime
View raw message