You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by ta...@apache.org on 2020/04/13 17:51:49 UTC
[myfaces] branch master updated (1226d07 -> 648fa14)
This is an automated email from the ASF dual-hosted git repository.
tandraschko pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces.git.
from 1226d07 MYFACES-3477 better initial buffersize
new 2bc8b3c MYFACES-3477 cosmetics
new 648fa14 MYFACES-3477 cosmetics
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.../apache/myfaces/application/viewstate/StateUtils.java | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
[myfaces] 01/02: MYFACES-3477 cosmetics
Posted by ta...@apache.org.
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
commit 2bc8b3c77216275c2d6f4166ed1b110ce47714a6
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Mon Apr 13 19:49:24 2020 +0200
MYFACES-3477 cosmetics
---
.../org/apache/myfaces/application/viewstate/StateUtils.java | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/impl/src/main/java/org/apache/myfaces/application/viewstate/StateUtils.java b/impl/src/main/java/org/apache/myfaces/application/viewstate/StateUtils.java
index cd9d3ef..29903c2 100644
--- a/impl/src/main/java/org/apache/myfaces/application/viewstate/StateUtils.java
+++ b/impl/src/main/java/org/apache/myfaces/application/viewstate/StateUtils.java
@@ -237,15 +237,16 @@ public final class StateUtils
public static final String construct(Object object, ExternalContext ctx)
{
byte[] bytes = getAsByteArray(object, ctx);
- if( enableCompression(ctx) )
+ if (enableCompression(ctx))
{
bytes = compress(bytes);
}
- if(isSecure(ctx))
+ if (isSecure(ctx))
{
bytes = encrypt(bytes, ctx);
}
bytes = encode(bytes);
+
try
{
return new String(bytes, ZIP_CHARSET);
@@ -375,21 +376,22 @@ public final class StateUtils
byte[] bytes;
try
{
- if(log.isLoggable(Level.FINE))
+ if (log.isLoggable(Level.FINE))
{
log.fine("Processing state : " + string);
}
bytes = string.getBytes(ZIP_CHARSET);
bytes = decode(bytes);
- if(isSecure(ctx))
+ if (isSecure(ctx))
{
bytes = decrypt(bytes, ctx);
}
- if( enableCompression(ctx) )
+ if (enableCompression(ctx))
{
bytes = decompress(bytes);
}
+
return getAsObject(bytes, ctx);
}
catch (Throwable e)
[myfaces] 02/02: MYFACES-3477 cosmetics
Posted by ta...@apache.org.
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
commit 648fa14e0f289ca4092c685ba78a62f9fcb668b4
Author: Thomas Andraschko <ta...@apache.org>
AuthorDate: Mon Apr 13 19:51:41 2020 +0200
MYFACES-3477 cosmetics
---
.../main/java/org/apache/myfaces/application/viewstate/StateUtils.java | 3 ---
1 file changed, 3 deletions(-)
diff --git a/impl/src/main/java/org/apache/myfaces/application/viewstate/StateUtils.java b/impl/src/main/java/org/apache/myfaces/application/viewstate/StateUtils.java
index 29903c2..086232a 100644
--- a/impl/src/main/java/org/apache/myfaces/application/viewstate/StateUtils.java
+++ b/impl/src/main/java/org/apache/myfaces/application/viewstate/StateUtils.java
@@ -188,7 +188,6 @@ public final class StateUtils
private static void testConfiguration(ExternalContext ctx)
{
-
String algorithmParams = ctx.getInitParameter(INIT_ALGORITHM_PARAM);
if (algorithmParams == null)
@@ -233,7 +232,6 @@ public final class StateUtils
/**
* This fires during the Render Response phase, saving state.
*/
-
public static final String construct(Object object, ExternalContext ctx)
{
byte[] bytes = getAsByteArray(object, ctx);
@@ -265,7 +263,6 @@ public final class StateUtils
* @param ctx
* @return
*/
-
public static final byte[] getAsByteArray(Object object, ExternalContext ctx)
{
// get the Factory that was instantiated @ startup