myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1411131 - /myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/
Date Mon, 19 Nov 2012 11:32:12 GMT
Author: struberg
Date: Mon Nov 19 11:32:10 2012
New Revision: 1411131

URL: http://svn.apache.org/viewvc?rev=1411131&view=rev
Log:
MYFACES-3644 remove unused classes, variables, generics

Removed:
    myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/ReferenceSerializedViewKey.java
Modified:
    myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterKeyFactory.java
    myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterSessionViewStorageFactory.java
    myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/KeyFactory.java
    myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomKeyFactory.java
    myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomSessionViewStorageFactory.java
    myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SecureRandomKeyFactory.java
    myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java
    myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java
    myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionViewStorageFactory.java

Modified: myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterKeyFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterKeyFactory.java?rev=1411131&r1=1411130&r2=1411131&view=diff
==============================================================================
--- myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterKeyFactory.java
(original)
+++ myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterKeyFactory.java
Mon Nov 19 11:32:10 2012
@@ -26,7 +26,7 @@ import org.apache.myfaces.shared.renderk
 /**
  *
  */
-class CounterKeyFactory extends KeyFactory<Integer, String>
+class CounterKeyFactory extends KeyFactory<Integer>
 {
 
     /**

Modified: myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterSessionViewStorageFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterSessionViewStorageFactory.java?rev=1411131&r1=1411130&r2=1411131&view=diff
==============================================================================
--- myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterSessionViewStorageFactory.java
(original)
+++ myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterSessionViewStorageFactory.java
Mon Nov 19 11:32:10 2012
@@ -22,13 +22,11 @@ import javax.faces.context.FacesContext;
 
 /**
  *
- * @author lu4242
  */
-class CounterSessionViewStorageFactory extends SessionViewStorageFactory
-    <KeyFactory<Integer, String>, Integer, String>
+class CounterSessionViewStorageFactory extends SessionViewStorageFactory<KeyFactory<Integer>,
Integer>
 {
 
-    public CounterSessionViewStorageFactory(KeyFactory<Integer, String> keyFactory)
+    public CounterSessionViewStorageFactory(KeyFactory<Integer> keyFactory)
     {
         super(keyFactory);
     }

Modified: myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/KeyFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/KeyFactory.java?rev=1411131&r1=1411130&r2=1411131&view=diff
==============================================================================
--- myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/KeyFactory.java
(original)
+++ myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/KeyFactory.java
Mon Nov 19 11:32:10 2012
@@ -23,31 +23,22 @@ import javax.faces.context.FacesContext;
 /**
  *
  */
-abstract class KeyFactory<K, V>
+abstract class KeyFactory<K>
 {
 
     /**
      * Generates a unique key per session
-     *
-     * @param facesContext
-     * @return
      */
     public abstract K generateKey(FacesContext facesContext);
 
     /**
      * Encode a Key into a value that will be used as view state session token
-     *
-     * @param key
-     * @return
      */
-    public abstract V encode(K key);
+    public abstract String encode(K key);
 
     /**
      * Decode a view state session token into a key
-     *
-     * @param value
-     * @return
      */
-    public abstract K decode(V value);
+    public abstract K decode(String value);
     
 }

Modified: myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomKeyFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomKeyFactory.java?rev=1411131&r1=1411130&r2=1411131&view=diff
==============================================================================
--- myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomKeyFactory.java
(original)
+++ myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomKeyFactory.java
Mon Nov 19 11:32:10 2012
@@ -30,7 +30,7 @@ import org.apache.myfaces.shared.util.We
 /**
  *
  */
-class RandomKeyFactory extends KeyFactory<byte[], String>
+class RandomKeyFactory extends KeyFactory<byte[]>
 {
     private final Random random;
     private final int length;
@@ -48,7 +48,7 @@ class RandomKeyFactory extends KeyFactor
     {
         ExternalContext externalContext = facesContext.getExternalContext();
         Object sessionObj = externalContext.getSession(true);
-        Integer sequence = null;
+        Integer sequence;
         synchronized (sessionObj) // are handled at the same time for the session
         {
             Map<String, Object> map = externalContext.getSessionMap();
@@ -102,8 +102,6 @@ class RandomKeyFactory extends KeyFactor
         {
             // Cannot decode, ignore silently, later it will be handled as
             // ViewExpiredException
-            // Cannot decode, ignore silently, later it will be handled as
-            // ViewExpiredException
         }
         return null;
     }

Modified: myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomSessionViewStorageFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomSessionViewStorageFactory.java?rev=1411131&r1=1411130&r2=1411131&view=diff
==============================================================================
--- myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomSessionViewStorageFactory.java
(original)
+++ myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomSessionViewStorageFactory.java
Mon Nov 19 11:32:10 2012
@@ -22,13 +22,11 @@ import javax.faces.context.FacesContext;
 
 /**
  *
- * @author lu4242
  */
-class RandomSessionViewStorageFactory extends SessionViewStorageFactory
-    <KeyFactory<byte[], String>, byte[], String>
+class RandomSessionViewStorageFactory extends SessionViewStorageFactory<KeyFactory<byte[]>,
byte[]>
 {
 
-    public RandomSessionViewStorageFactory(KeyFactory<byte[], String> keyFactory)
+    public RandomSessionViewStorageFactory(KeyFactory<byte[]> keyFactory)
     {
         super(keyFactory);
     }

Modified: myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SecureRandomKeyFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SecureRandomKeyFactory.java?rev=1411131&r1=1411130&r2=1411131&view=diff
==============================================================================
--- myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SecureRandomKeyFactory.java
(original)
+++ myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SecureRandomKeyFactory.java
Mon Nov 19 11:32:10 2012
@@ -31,7 +31,7 @@ import org.apache.myfaces.shared.util.We
  * counter ensures uniqueness, and the random number prevents guess the next
  * session token.
  */
-class SecureRandomKeyFactory extends KeyFactory<byte[], String>
+class SecureRandomKeyFactory extends KeyFactory<byte[]>
 {
     private final SessionIdGenerator sessionIdGenerator;
     private final int length;
@@ -71,7 +71,7 @@ class SecureRandomKeyFactory extends Key
     {
         ExternalContext externalContext = facesContext.getExternalContext();
         Object sessionObj = externalContext.getSession(true);
-        Integer sequence = null;
+        Integer sequence;
         synchronized (sessionObj) // are handled at the same time for the session
         {
             Map<String, Object> map = externalContext.getSessionMap();
@@ -124,8 +124,6 @@ class SecureRandomKeyFactory extends Key
         {
             // Cannot decode, ignore silently, later it will be handled as
             // ViewExpiredException
-            // Cannot decode, ignore silently, later it will be handled as
-            // ViewExpiredException
         }
         return null;
     }

Modified: myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java?rev=1411131&r1=1411130&r2=1411131&view=diff
==============================================================================
--- myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java
(original)
+++ myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java
Mon Nov 19 11:32:10 2012
@@ -260,7 +260,7 @@ class ServerSideStateCacheImpl extends S
     {
       if (state != null)
       {
-          return getKeyFactory(facesContext).decode(state);
+          return getKeyFactory(facesContext).decode((String) state);
       }
       return null;
     }

Modified: myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java?rev=1411131&r1=1411130&r2=1411131&view=diff
==============================================================================
--- myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java
(original)
+++ myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java
Mon Nov 19 11:32:10 2012
@@ -30,15 +30,12 @@ import java.util.logging.Logger;
  * NOTE: Class taken from tomcat 7 org.apache.catalina.util.SessionIdGenerator
  * and used here as an alternative for server side state token encryption.
  * 
- * @author Leonardo Uribe
  */
 class SessionIdGenerator
 {
 
     private static Logger log = Logger.getLogger(SessionIdGenerator.class.getName());
-    //private static StringManager sm =
-    //        StringManager.getManager("org.apache.catalina.util");
-    
+
     /**
      * Queue of random number generator objects to be used when creating session
      * identifiers. If the queue is empty when a random number generator is

Modified: myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionViewStorageFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionViewStorageFactory.java?rev=1411131&r1=1411130&r2=1411131&view=diff
==============================================================================
--- myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionViewStorageFactory.java
(original)
+++ myfaces/core/branches/2.2.x/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionViewStorageFactory.java
Mon Nov 19 11:32:10 2012
@@ -24,18 +24,17 @@ import javax.faces.context.FacesContext;
  *
  * @param <T>
  * @param <K>
- * @param <V>
  */
-abstract class SessionViewStorageFactory<T extends KeyFactory<K, V>, K, V>
+abstract class SessionViewStorageFactory<T extends KeyFactory<K>, K>
 {
-    private KeyFactory<K, V> keyFactory;
+    private KeyFactory<K> keyFactory;
 
-    public SessionViewStorageFactory(KeyFactory<K, V> keyFactory)
+    public SessionViewStorageFactory(KeyFactory<K> keyFactory)
     {
         this.keyFactory = keyFactory;
     }
 
-    public KeyFactory<K, V> getKeyFactory()
+    public KeyFactory<K> getKeyFactory()
     {
         return keyFactory;
     }



Mime
View raw message