myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r511489 - in /myfaces/core/branches/jsf12/impl/src/main/java/org/apache/myfaces/lifecycle: LifecycleImpl.java PhaseListenerManager.java
Date Sun, 25 Feb 2007 12:44:34 GMT
Author: mbr
Date: Sun Feb 25 04:44:33 2007
New Revision: 511489

URL: http://svn.apache.org/viewvc?view=rev&rev=511489
Log:
generic types

Modified:
    myfaces/core/branches/jsf12/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java
    myfaces/core/branches/jsf12/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java

Modified: myfaces/core/branches/jsf12/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/jsf12/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java?view=diff&rev=511489&r1=511488&r2=511489
==============================================================================
--- myfaces/core/branches/jsf12/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java
(original)
+++ myfaces/core/branches/jsf12/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java
Sun Feb 25 04:44:33 2007
@@ -44,7 +44,7 @@
     private PhaseExecutor[] lifecycleExecutors;
     private PhaseExecutor renderExecutor;
 
-    private final List _phaseListenerList = new ArrayList();
+    private final List<PhaseListener> _phaseListenerList = new ArrayList<PhaseListener>();
 
     /**
      * Lazy cache for returning _phaseListenerList as an Array.
@@ -194,7 +194,7 @@
 		synchronized (_phaseListenerList) {
 			// (re)build lazy cache array if necessary
 			if (_phaseListenerArray == null) {
-				_phaseListenerArray = (PhaseListener[]) _phaseListenerList.toArray(new PhaseListener[_phaseListenerList
+				_phaseListenerArray = _phaseListenerList.toArray(new PhaseListener[_phaseListenerList
 						.size()]);
 			}
 			return _phaseListenerArray;

Modified: myfaces/core/branches/jsf12/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/jsf12/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java?view=diff&rev=511489&r1=511488&r2=511489
==============================================================================
--- myfaces/core/branches/jsf12/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java
(original)
+++ myfaces/core/branches/jsf12/impl/src/main/java/org/apache/myfaces/lifecycle/PhaseListenerManager.java
Sun Feb 25 04:44:33 2007
@@ -47,7 +47,7 @@
     // Tracks success in the beforePhase.  Listeners that throw an exception
     // in beforePhase or were never called because a previous listener threw
     // an exception should not have its afterPhase called
-    private Map listenerSuccessMap = new HashMap();
+    private Map<PhaseId, boolean[]> listenerSuccessMap = new HashMap<PhaseId, boolean[]>();
     
     /** Creates a new instance of PhaseListenerManager */
     PhaseListenerManager(Lifecycle lifecycle, FacesContext facesContext, PhaseListener[]
phaseListeners) {
@@ -82,7 +82,7 @@
     }
 
     void informPhaseListenersAfter(PhaseId phaseId) {
-        boolean[] beforePhaseSuccess = (boolean[])listenerSuccessMap.get(phaseId);
+        boolean[] beforePhaseSuccess = listenerSuccessMap.get(phaseId);
         
         for (int i = phaseListeners.length - 1; i >= 0; i--)  {
             PhaseListener phaseListener = phaseListeners[i];



Mime
View raw message