myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tandrasc...@apache.org
Subject [myfaces] branch master updated: refactored
Date Mon, 14 Oct 2019 12:46:27 GMT
This is an automated email from the ASF dual-hosted git repository.

tandraschko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/master by this push:
     new 8153f4b  refactored
8153f4b is described below

commit 8153f4b8f02cb57be1a932300b7508a2ffc707f2
Author: Thomas Andraschko <tandraschko@apache.org>
AuthorDate: Mon Oct 14 14:46:18 2019 +0200

    refactored
---
 .../main/java/javax/faces/application/_NavigationUtils.java    |  7 ++-----
 .../src/main/java/org/apache/myfaces/util/NavigationUtils.java | 10 ++++------
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/api/src/main/java/javax/faces/application/_NavigationUtils.java b/api/src/main/java/javax/faces/application/_NavigationUtils.java
index 98689c0..73ae152 100644
--- a/api/src/main/java/javax/faces/application/_NavigationUtils.java
+++ b/api/src/main/java/javax/faces/application/_NavigationUtils.java
@@ -88,11 +88,8 @@ class _NavigationUtils
         for (int i = 0; i < values.size(); i++)
         {
             String value = values.get(i);
-            if (_isExpression(value))
-            {
-                // evaluate the ValueExpression
-                value = context.getApplication().evaluateExpressionGet(context, value, String.class);
-            }
+            // evaluate the ValueExpression
+            value = context.getApplication().evaluateExpressionGet(context, value, String.class);
             target.add(value);
         }
         return target;
diff --git a/impl/src/main/java/org/apache/myfaces/util/NavigationUtils.java b/impl/src/main/java/org/apache/myfaces/util/NavigationUtils.java
index 928ff41..75b7be1 100644
--- a/impl/src/main/java/org/apache/myfaces/util/NavigationUtils.java
+++ b/impl/src/main/java/org/apache/myfaces/util/NavigationUtils.java
@@ -129,13 +129,11 @@ public final class NavigationUtils
         // change any value on the given List, it will be changed in the
         // NavigationCase too and the EL expression won't be evaluated again
         List<String> target = new ArrayList<>(values.size());
-        for (String value : values)
+        for (int i = 0; i < values.size(); i++)
         {
-            if (_isExpression(value))
-            {
-                // evaluate the ValueExpression
-                value = context.getApplication().evaluateExpressionGet(context, value, String.class);
-            }
+            String value = values.get(i);
+            // evaluate the ValueExpression
+            value = context.getApplication().evaluateExpressionGet(context, value, String.class);
             target.add(value);
         }
         return target;


Mime
View raw message