myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From volos...@apache.org
Subject [myfaces] branch 3.0.x updated: Apply MyFaces-4404 -- Log viewstate hash
Date Thu, 08 Jul 2021 18:06:21 GMT
This is an automated email from the ASF dual-hosted git repository.

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


The following commit(s) were added to refs/heads/3.0.x by this push:
     new 6e20231  Apply MyFaces-4404 -- Log viewstate hash
6e20231 is described below

commit 6e20231ce8052f9af40964c5c64f29c5266ed6b5
Author: Volodymyr Siedlecki <volosied@gmail.com>
AuthorDate: Thu Jul 8 14:01:21 2021 -0400

    Apply MyFaces-4404 -- Log viewstate hash
---
 .../apache/myfaces/renderkit/html/HtmlResponseStateManager.java   | 8 ++++++++
 .../src/main/java/org/apache/myfaces/shared/util/StateUtils.java  | 1 +
 2 files changed, 9 insertions(+)

diff --git a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
index 0cf4796..5f338dd 100755
--- a/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
+++ b/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
@@ -20,8 +20,10 @@ package org.apache.myfaces.renderkit.html;
 
 import java.io.IOException;
 import java.util.Map;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
+
 import jakarta.faces.context.ExternalContext;
 import jakarta.faces.context.FacesContext;
 import jakarta.faces.context.ResponseWriter;
@@ -121,6 +123,12 @@ public class HtmlResponseStateManager extends MyfacesResponseStateManager
     {
         String serializedState = getStateCache(facesContext).getStateTokenProcessor(facesContext)
                 .encode(facesContext, savedState);
+        
+        if (log.isLoggable(Level.FINE)) 
+        {
+             log.fine("Writing serialized viewstate string with hashCode : " + serializedState.hashCode());
+        }
+
         ExternalContext extContext = facesContext.getExternalContext();
         MyfacesConfig myfacesConfig = MyfacesConfig.getCurrentInstance(extContext);
 
diff --git a/shared/src/main/java/org/apache/myfaces/shared/util/StateUtils.java b/shared/src/main/java/org/apache/myfaces/shared/util/StateUtils.java
index c5c878e..18bb0a1 100644
--- a/shared/src/main/java/org/apache/myfaces/shared/util/StateUtils.java
+++ b/shared/src/main/java/org/apache/myfaces/shared/util/StateUtils.java
@@ -395,6 +395,7 @@ public final class StateUtils
             if(log.isLoggable(Level.FINE))
             {
                 log.fine("Processing state : " + string);
+                log.fine("Processing serialized viewstate string with hashCode : " + string.hashCode());
             }
 
             bytes = string.getBytes(ZIP_CHARSET);

Mime
View raw message