myfaces-commits mailing list archives

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

volosied 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 f91f2fe  Apply MyFaces-4404 -- log viewstate hashcode
f91f2fe is described below

commit f91f2fefc6c689539970aa9deba8485f52854289
Author: Volodymyr Siedlecki <volosied@gmail.com>
AuthorDate: Thu Jul 8 14:09:36 2021 -0400

    Apply MyFaces-4404 -- log viewstate hashcode
---
 .../apache/myfaces/renderkit/html/HtmlResponseStateManager.java    | 7 +++++++
 .../src/main/java/org/apache/myfaces/shared/util/StateUtils.java   | 1 +
 2 files changed, 8 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 23bf718..84a519e 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,6 +20,7 @@ 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 javax.faces.context.ExternalContext;
@@ -143,6 +144,12 @@ public class HtmlResponseStateManager extends MyfacesResponseStateManager
         throws IOException
     {
         String serializedState = _stateTokenProcessor.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 c68cb33..4d1112d 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
@@ -392,6 +392,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