myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1410652 - in /myfaces/core/trunk/impl/src/main/java/org/apache/myfaces: application/viewstate/ renderkit/html/
Date Sat, 17 Nov 2012 00:33:59 GMT
Author: struberg
Date: Sat Nov 17 00:33:57 2012
New Revision: 1410652

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

rest comes after the release

Removed:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/ReferenceSerializedViewKey.java
Modified:
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterKeyFactory.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterSessionViewStorageFactory.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/KeyFactory.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomKeyFactory.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomSessionViewStorageFactory.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SecureRandomKeyFactory.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionViewStorageFactory.java
    myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterKeyFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterKeyFactory.java?rev=1410652&r1=1410651&r2=1410652&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterKeyFactory.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterKeyFactory.java
Sat Nov 17 00:33:57 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/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterSessionViewStorageFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterSessionViewStorageFactory.java?rev=1410652&r1=1410651&r2=1410652&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterSessionViewStorageFactory.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/CounterSessionViewStorageFactory.java
Sat Nov 17 00:33:57 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/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/KeyFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/KeyFactory.java?rev=1410652&r1=1410651&r2=1410652&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/KeyFactory.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/KeyFactory.java
Sat Nov 17 00:33:57 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/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomKeyFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomKeyFactory.java?rev=1410652&r1=1410651&r2=1410652&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomKeyFactory.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomKeyFactory.java
Sat Nov 17 00:33:57 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/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomSessionViewStorageFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomSessionViewStorageFactory.java?rev=1410652&r1=1410651&r2=1410652&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomSessionViewStorageFactory.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/RandomSessionViewStorageFactory.java
Sat Nov 17 00:33:57 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/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SecureRandomKeyFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SecureRandomKeyFactory.java?rev=1410652&r1=1410651&r2=1410652&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SecureRandomKeyFactory.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SecureRandomKeyFactory.java
Sat Nov 17 00:33:57 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/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java?rev=1410652&r1=1410651&r2=1410652&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/ServerSideStateCacheImpl.java
Sat Nov 17 00:33:57 2012
@@ -258,7 +258,7 @@ class ServerSideStateCacheImpl extends S
     {
       if (state != null)
       {
-          return getKeyFactory(facesContext).decode(state);
+          return getKeyFactory(facesContext).decode((String) state);
       }
       return null;
     }
@@ -406,13 +406,9 @@ class ServerSideStateCacheImpl extends S
                     os.write(UNCOMPRESSED_FLAG);
                 }
 
-                //Object[] stateArray = (Object[]) serializedView;
-
                 ObjectOutputStream out = new ObjectOutputStream(os);
                 
                 out.writeObject(serializedView);
-                //out.writeObject(stateArray[0]);
-                //out.writeObject(stateArray[1]);
                 out.close();
                 baos.close();
 

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java?rev=1410652&r1=1410651&r2=1410652&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionIdGenerator.java
Sat Nov 17 00:33:57 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/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionViewStorageFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionViewStorageFactory.java?rev=1410652&r1=1410651&r2=1410652&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionViewStorageFactory.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/viewstate/SessionViewStorageFactory.java
Sat Nov 17 00:33:57 2012
@@ -24,25 +24,23 @@ 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;
     }
 
     public abstract SerializedViewCollection createSerializedViewCollection(FacesContext
context);
 
-    public abstract SerializedViewKey createSerializedViewKey(
-        FacesContext facesContext, String viewId, K key);
+    public abstract SerializedViewKey createSerializedViewKey(FacesContext facesContext,
String viewId, K key);
     
 }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java?rev=1410652&r1=1410651&r2=1410652&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
(original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
Sat Nov 17 00:33:57 2012
@@ -46,10 +46,8 @@ import org.apache.myfaces.shared.util.We
  */
 public class HtmlResponseStateManager extends MyfacesResponseStateManager
 {
-    //private static final Log log = LogFactory.getLog(HtmlResponseStateManager.class);
     private static final Logger log = Logger.getLogger(HtmlResponseStateManager.class.getName());
 
-    //private static final int TREE_PARAM = 2;
     private static final int STATE_PARAM = 0;
     private static final int VIEWID_PARAM = 1;
 
@@ -97,7 +95,6 @@ public class HtmlResponseStateManager ex
         
         if (isHandlingStateCachingMechanics(facesContext))
         {
-            //token = getStateCache(facesContext).saveSerializedView(facesContext, state);
             savedStateObject = getStateCache(facesContext).encodeSerializedState(facesContext,
state);
         }
         else



Mime
View raw message