You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by wt...@apache.org on 2020/04/28 18:29:02 UTC

[myfaces] branch 2.2.x updated: Update partialStateSavingDefault to check for facesVersion >=2

This is an automated email from the ASF dual-hosted git repository.

wtlucy pushed a commit to branch 2.2.x
in repository https://gitbox.apache.org/repos/asf/myfaces.git


The following commit(s) were added to refs/heads/2.2.x by this push:
     new 8fd16b9  Update partialStateSavingDefault to check for facesVersion >=2
     new a55494f  Merge pull request #100 from volosied/update-partialStateSavingDefault-2.2
8fd16b9 is described below

commit 8fd16b98881f53508757a2c511321f24d9e49f7c
Author: Volodymyr Siedlecki <si...@Volodymyrs-MBP.lan>
AuthorDate: Tue Apr 28 13:39:14 2020 -0400

    Update partialStateSavingDefault to check for facesVersion >=2
---
 .../apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java   | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
index b82f26f..b3df1b7 100644
--- a/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
+++ b/impl/src/main/java/org/apache/myfaces/view/facelets/FaceletViewDeclarationLanguage.java
@@ -2620,8 +2620,7 @@ public class FaceletViewDeclarationLanguage extends FaceletViewDeclarationLangua
         // Per spec section 11.1.3, the default value for the partial state saving feature needs
         // to be true if 2.0, false otherwise.
 
-        partialStateSavingDefault = "2.0".equals(facesVersion) || "2.1".equals(facesVersion) || 
-            "2.2".equals(facesVersion) || (facesVersion == null);
+        partialStateSavingDefault = (facesVersion == null) || Float.parseFloat(facesVersion) >= 2;
 
         // In jsf 2.0 this code evolve as PartialStateSaving feature
         //_buildBeforeRestore = _getBooleanParameter(context, PARAM_BUILD_BEFORE_RESTORE, false);