freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [4/9] incubator-freemarker git commit: FREEMARKER-55: renaming util methods to get*ArgumentAndUnwrap()
Date Thu, 14 Sep 2017 09:14:13 GMT
FREEMARKER-55: renaming util methods to get*ArgumentAndUnwrap()


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

Branch: refs/heads/3
Commit: a95c17f9070b9a720fd4577ddf1506681840e295
Parents: f6abc30
Author: Woonsan Ko <woonsan@apache.org>
Authored: Wed Sep 13 21:15:41 2017 -0400
Committer: Woonsan Ko <woonsan@apache.org>
Committed: Wed Sep 13 21:15:41 2017 -0400

----------------------------------------------------------------------
 .../org/apache/freemarker/core/util/CallableUtils.java    | 10 +++++-----
 .../apache/freemarker/spring/model/MessageFunction.java   |  2 +-
 .../apache/freemarker/spring/model/TransformFunction.java |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a95c17f9/freemarker-core/src/main/java/org/apache/freemarker/core/util/CallableUtils.java
----------------------------------------------------------------------
diff --git a/freemarker-core/src/main/java/org/apache/freemarker/core/util/CallableUtils.java
b/freemarker-core/src/main/java/org/apache/freemarker/core/util/CallableUtils.java
index 0c8f09f..8f53df1 100644
--- a/freemarker-core/src/main/java/org/apache/freemarker/core/util/CallableUtils.java
+++ b/freemarker-core/src/main/java/org/apache/freemarker/core/util/CallableUtils.java
@@ -750,7 +750,7 @@ public final class CallableUtils {
      * Convenience method to call
      * {@link #unwrapAndCastArgumentValue(TemplateModel, int, Class, boolean, TemplateModel,
TemplateCallableModel, boolean)}.
      */
-    public static <T> T getAndUnwrapArgument(
+    public static <T> T getArgumentAndUnwrap(
             TemplateModel[] args, int argIndex, Class<T> type, TemplateDirectiveModel
callable,
             ObjectWrapperAndUnwrapper objectWrapperAndUnwrapper)
             throws TemplateException {
@@ -762,7 +762,7 @@ public final class CallableUtils {
      * Convenience method to call
      * {@link #unwrapAndCastArgumentValue(TemplateModel, int, Class, boolean, TemplateModel,
TemplateCallableModel, boolean)}.
      */
-    public static <T> T getOptionalAndUnwrapArgument(
+    public static <T> T getOptionalArgumentAndUnwrap(
             TemplateModel[] args, int argIndex, Class<T> type, TemplateFunctionModel
callable,
             ObjectWrapperAndUnwrapper objectWrapperAndUnwrapper)
             throws TemplateException {
@@ -774,7 +774,7 @@ public final class CallableUtils {
      * Convenience method to call
      * {@link #unwrapAndCastArgumentValue(TemplateModel, int, Class, boolean, TemplateModel,
TemplateCallableModel, boolean)}.
      */
-    public static <T> T getOptionalAndUnwrapArgument(
+    public static <T> T getOptionalArgumentAndUnwrap(
             TemplateModel[] args, int argIndex, Class<T> type, TemplateDirectiveModel
callable,
             ObjectWrapperAndUnwrapper objectWrapperAndUnwrapper)
             throws TemplateException {
@@ -786,7 +786,7 @@ public final class CallableUtils {
      * Convenience method to call
      * {@link #unwrapAndCastArgumentValue(TemplateModel, int, Class, boolean, TemplateModel,
TemplateCallableModel, boolean)}.
      */
-    public static <T> T getOptionalAndUnwrapArgument(
+    public static <T> T getOptionalArgumentAndUnwrap(
             TemplateModel[] args, int argIndex, Class<T> type, T defaultValue, TemplateFunctionModel
callable,
             ObjectWrapperAndUnwrapper objectWrapperAndUnwrapper)
             throws TemplateException {
@@ -798,7 +798,7 @@ public final class CallableUtils {
      * Convenience method to call
      * {@link #unwrapAndCastArgumentValue(TemplateModel, int, Class, boolean, TemplateModel,
TemplateCallableModel, boolean)}.
      */
-    public static <T> T getOptionalAndUnwrapArgument(
+    public static <T> T getOptionalArgumentAndUnwrap(
             TemplateModel[] args, int argIndex, Class<T> type, T defaultValue, TemplateDirectiveModel
callable,
             ObjectWrapperAndUnwrapper objectWrapperAndUnwrapper)
             throws TemplateException {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a95c17f9/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/MessageFunction.java
----------------------------------------------------------------------
diff --git a/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/MessageFunction.java
b/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/MessageFunction.java
index 7ce8d40..3755849 100644
--- a/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/MessageFunction.java
+++ b/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/MessageFunction.java
@@ -108,7 +108,7 @@ class MessageFunction extends AbstractSpringTemplateFunctionModel {
 
         String message = null;
 
-        final MessageSourceResolvable messageResolvable = CallableUtils.getOptionalAndUnwrapArgument(args,
+        final MessageSourceResolvable messageResolvable = CallableUtils.getOptionalArgumentAndUnwrap(args,
                 MESSAGE_RESOLVABLE_PARAM_IDX, MessageSourceResolvable.class, this, objectWrapperAndUnwrapper);
 
         if (messageResolvable != null) {

http://git-wip-us.apache.org/repos/asf/incubator-freemarker/blob/a95c17f9/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/TransformFunction.java
----------------------------------------------------------------------
diff --git a/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/TransformFunction.java
b/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/TransformFunction.java
index cac1dd6..f76cc4b 100644
--- a/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/TransformFunction.java
+++ b/freemarker-spring/src/main/java/org/apache/freemarker/spring/model/TransformFunction.java
@@ -73,9 +73,9 @@ class TransformFunction extends AbstractSpringTemplateFunctionModel {
     protected TemplateModel executeInternal(TemplateModel[] args, CallPlace callPlace, Environment
env,
             ObjectWrapperAndUnwrapper objectWrapperAndUnwrapper, RequestContext requestContext)
                     throws TemplateException {
-        final PropertyEditor editor = CallableUtils.getOptionalAndUnwrapArgument(args, PROPERTY_EDITOR_PARAM_IDX,
+        final PropertyEditor editor = CallableUtils.getOptionalArgumentAndUnwrap(args, PROPERTY_EDITOR_PARAM_IDX,
                 PropertyEditor.class, this, objectWrapperAndUnwrapper);
-        final Object value = CallableUtils.getOptionalAndUnwrapArgument(args, VALUE_PARAM_IDX,
+        final Object value = CallableUtils.getOptionalArgumentAndUnwrap(args, VALUE_PARAM_IDX,
                 null, this, objectWrapperAndUnwrapper);
 
         String valueAsString = null;


Mime
View raw message