You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@freemarker.apache.org by dd...@apache.org on 2017/04/15 21:51:32 UTC

incubator-freemarker git commit: Configuration.setSharedVaribles (not the typo in it) was renamed to setSharedVariables.

Repository: incubator-freemarker
Updated Branches:
  refs/heads/3 de2532d26 -> 7ff4f4c02


Configuration.setSharedVaribles (not the typo in it) was renamed to setSharedVariables.


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

Branch: refs/heads/3
Commit: 7ff4f4c027ec2007600c3e50a46386a52afd7009
Parents: de2532d
Author: ddekany <dd...@apache.org>
Authored: Sat Apr 15 23:51:27 2017 +0200
Committer: ddekany <dd...@apache.org>
Committed: Sat Apr 15 23:51:27 2017 +0200

----------------------------------------------------------------------
 .../java/org/apache/freemarker/core/Configuration.java    | 10 +++++-----
 .../org/apache/freemarker/core/model/ObjectWrapper.java   |  2 +-
 src/manual/en_US/FM3-CHANGE-LOG.txt                       |  3 ++-
 .../org/apache/freemarker/core/ConfigurationTest.java     |  4 ++--
 4 files changed, 10 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/7ff4f4c0/src/main/java/org/apache/freemarker/core/Configuration.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/Configuration.java b/src/main/java/org/apache/freemarker/core/Configuration.java
index ce53af7..fa5d5d4 100644
--- a/src/main/java/org/apache/freemarker/core/Configuration.java
+++ b/src/main/java/org/apache/freemarker/core/Configuration.java
@@ -440,7 +440,7 @@ public final class Configuration extends MutableProcessingConfiguration<Configur
     private final Object customStateMapLock = new Object();
 
     /**
-     * Needed so that it doesn't mater in what order do you call {@link #setSharedVaribles(Map)}
+     * Needed so that it doesn't mater in what order do you call {@link #setSharedVariables(Map)}
      * and {@link #setObjectWrapper(ObjectWrapper)}. When the user configures FreeMarker from Spring XML, he has no
      * control over the order, so it has to work on both ways.
      */
@@ -2263,7 +2263,7 @@ public final class Configuration extends MutableProcessingConfiguration<Configur
      *
      * @throws TemplateModelException If some of the variables couldn't be wrapped via {@link #getObjectWrapper()}.
      *
-     * @see #setSharedVaribles(Map)
+     * @see #setSharedVariables(Map)
      * @see #setSharedVariable(String,TemplateModel)
      * @see #setAllSharedVariables(TemplateHashModelEx)
      */
@@ -2278,7 +2278,7 @@ public final class Configuration extends MutableProcessingConfiguration<Configur
      * to {@link TemplateModel} with the {@link ObjectWrapper} returned by {@link #getObjectWrapper()}. If
      * {@link #setObjectWrapper(ObjectWrapper)} is called later, this conversion will be re-applied. Thus, ignoring some
      * extra resource usage, it doesn't mater if in what order are {@link #setObjectWrapper(ObjectWrapper)} and
-     * {@link #setSharedVaribles(Map)} called. This is essential when you don't have control over the order in which
+     * {@link #setSharedVariables(Map)} called. This is essential when you don't have control over the order in which
      * the setters are called. 
      *
      * <p>The values in the map must be thread safe, if you are running templates from multiple threads with
@@ -2293,7 +2293,7 @@ public final class Configuration extends MutableProcessingConfiguration<Configur
      *  
      * @since 2.3.21
      */
-    public void setSharedVaribles(Map/*<String, Object>*/ map) throws TemplateModelException {
+    public void setSharedVariables(Map/*<String, Object>*/ map) throws TemplateModelException {
         rewrappableSharedVariables = new HashMap(map);
         sharedVariables.clear();
         setSharedVariablesFromRewrappableSharedVariables();
@@ -2330,7 +2330,7 @@ public final class Configuration extends MutableProcessingConfiguration<Configur
      * If a shared variable with these names already exist, it will be replaced
      * with those from the map.
      *
-     * @see #setSharedVaribles(Map)
+     * @see #setSharedVariables(Map)
      * @see #setSharedVariable(String,Object)
      * @see #setSharedVariable(String,TemplateModel)
      */

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/7ff4f4c0/src/main/java/org/apache/freemarker/core/model/ObjectWrapper.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/apache/freemarker/core/model/ObjectWrapper.java b/src/main/java/org/apache/freemarker/core/model/ObjectWrapper.java
index 6df881f..46d6f72 100644
--- a/src/main/java/org/apache/freemarker/core/model/ObjectWrapper.java
+++ b/src/main/java/org/apache/freemarker/core/model/ObjectWrapper.java
@@ -52,7 +52,7 @@ public interface ObjectWrapper {
      *     The default expectation is that the {@link TemplateModel} isn't less thread safe than the wrapped object.
      *     If the {@link ObjectWrapper} returns less thread safe objects, that should be clearly documented, as it
      *     restricts how it can be used, like, then it can't be used to wrap "shared variables"
-     *     ({@link Configuration#setSharedVaribles(Map)}).
+     *     ({@link Configuration#setSharedVariables(Map)}).
      */
     TemplateModel wrap(Object obj) throws TemplateModelException;
     

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/7ff4f4c0/src/manual/en_US/FM3-CHANGE-LOG.txt
----------------------------------------------------------------------
diff --git a/src/manual/en_US/FM3-CHANGE-LOG.txt b/src/manual/en_US/FM3-CHANGE-LOG.txt
index 4c08043..9399918 100644
--- a/src/manual/en_US/FM3-CHANGE-LOG.txt
+++ b/src/manual/en_US/FM3-CHANGE-LOG.txt
@@ -211,4 +211,5 @@ the FreeMarer 3 changelog here:
   no Template.name anymore, because since sourceName was introduced, and hence the concept of template name was split into the
   lookup and the source name, its meaning wasn't clean (but it meant the lookup name). TemplateException and ParseException 
   now also have the same properites: getTemplateSourceName(), getTemplateLookupName(), and even getSourceOrLookupName().
-  Location information in error messages show getTemplateSourceOrLookupName().
\ No newline at end of file
+  Location information in error messages show getTemplateSourceOrLookupName().
+- Configuration.setSharedVaribles (not the typo in it) was renamed to setSharedVariables
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/7ff4f4c0/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/freemarker/core/ConfigurationTest.java b/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
index 9c8b264..eaac897 100644
--- a/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
+++ b/src/test/java/org/apache/freemarker/core/ConfigurationTest.java
@@ -905,7 +905,7 @@ public class ConfigurationTest extends TestCase {
         vars.put("a", "aa");
         vars.put("b", "bb");
         vars.put("c", new MyScalarModel());
-        cfg.setSharedVaribles(vars);
+        cfg.setSharedVariables(vars);
 
         assertNull(cfg.getSharedVariable("erased"));
         
@@ -926,7 +926,7 @@ public class ConfigurationTest extends TestCase {
         // Legacy method: Keeps TemplateModel created on the time it was called. 
         cfg.setSharedVariable("b", "bbLegacy");
         
-        // Cause re-wrapping of variables added via setSharedVaribles:
+        // Cause re-wrapping of variables added via setSharedVariables:
         cfg.setObjectWrapper(new DefaultObjectWrapper.Builder(Configuration.VERSION_3_0_0).build());
 
         {