You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2008/09/14 01:10:56 UTC

svn commit: r695059 [2/4] - in /myfaces/core/branches/2_0_0: ./ api/ api/src/main/java/javax/faces/component/ api/src/main/java/javax/faces/convert/ api/src/main/java/javax/faces/validator/ api/src/main/java/javax/faces/webapp/ impl/ impl/src/main/conf...

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspStateManagerImpl.java Sat Sep 13 16:10:53 2008
@@ -97,6 +97,46 @@
      */
     private static final boolean DEFAULT_SERIALIZE_STATE_IN_SESSION = true;
 
+    /**
+     * Define the way of handle old view references(views removed from session), making possible to
+     * store it in a cache, so the state manager first try to get the view from the session. If is it
+     * not found and soft or weak ReferenceMap is used, it try to get from it.
+     * <p>
+     * Only applicable if state saving method is "server" (= default).
+     * </p>
+     * <p>
+     * The gc is responsible for remove the views, according to the rules used for soft, weak or phantom
+     * references. If a key in soft and weak mode is garbage collected, its values are purged.
+     * </p>
+     * <p>
+     * By default no cache is used, so views removed from session became phantom references.
+     * </p>
+     * <ul> 
+     * <li> off, no: default, no cache is used</li> 
+     * <li> hard-soft: use an ReferenceMap(AbstractReferenceMap.HARD, AbstractReferenceMap.SOFT)</li>
+     * <li> soft: use an ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.SOFT, true) </li>
+     * <li> soft-weak: use an ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.WEAK, true) </li>
+     * <li> weak: use an ReferenceMap(AbstractReferenceMap.WEAK, AbstractReferenceMap.WEAK, true) </li>
+     * </ul>
+     * 
+     */
+    private static final String CACHE_OLD_VIEWS_IN_SESSION_MODE = "org.apache.myfaces.CACHE_OLD_VIEWS_IN_SESSION_MODE";
+    
+    /**
+     * This option uses an hard-soft ReferenceMap, but it could cause a 
+     * memory leak, because the keys are not removed by any method
+     * (MYFACES-1660). So use with caution.
+     */
+    private static final String CACHE_OLD_VIEWS_IN_SESSION_MODE_HARD_SOFT = "hard-soft";
+    
+    private static final String CACHE_OLD_VIEWS_IN_SESSION_MODE_SOFT = "soft";
+    
+    private static final String CACHE_OLD_VIEWS_IN_SESSION_MODE_SOFT_WEAK = "soft-weak";
+    
+    private static final String CACHE_OLD_VIEWS_IN_SESSION_MODE_WEAK = "weak";
+    
+    private static final String CACHE_OLD_VIEWS_IN_SESSION_MODE_OFF = "off";
+
     private static final int UNCOMPRESSED_FLAG = 0;
     private static final int COMPRESSED_FLAG = 1;
 
@@ -601,11 +641,11 @@
             Integer sequence = (Integer) map.get(RendererUtils.SEQUENCE_PARAM);
             if(sequence == null || sequence.intValue() == Integer.MAX_VALUE)
             {
-                sequence = new Integer(1);
+                sequence = Integer.valueOf(1);
             }
             else
             {
-                sequence = new Integer(sequence.intValue() + 1);
+                sequence = Integer.valueOf(sequence.intValue() + 1);
             }
             map.put(RendererUtils.SEQUENCE_PARAM, sequence);
             externalContext.getRequestMap().put(RendererUtils.SEQUENCE_PARAM, sequence);
@@ -788,7 +828,8 @@
             {
                 key = _keys.remove(0);
                 Object oldView = _serializedViews.remove(key);
-                if (oldView != null)
+                if (oldView != null && 
+                    !CACHE_OLD_VIEWS_IN_SESSION_MODE_OFF.equals(getCacheOldViewsInSessionMode(context))) 
                 {
                     getOldSerializedViewsMap().put(key, oldView);
                 }
@@ -834,20 +875,78 @@
          */
         protected Map<Object, Object> getOldSerializedViewsMap()
         {
-            if (_oldSerializedViews == null)
+            FacesContext context = FacesContext.getCurrentInstance();
+            if (_oldSerializedViews == null && context != null)
             {
-                _oldSerializedViews = new ReferenceMap(AbstractReferenceMap.WEAK, AbstractReferenceMap.WEAK, true);
+                String cacheMode = getCacheOldViewsInSessionMode(context); 
+                if (CACHE_OLD_VIEWS_IN_SESSION_MODE_WEAK.equals(cacheMode))
+                {
+                    _oldSerializedViews = new ReferenceMap(AbstractReferenceMap.WEAK, AbstractReferenceMap.WEAK, true);
+                }
+                else if (CACHE_OLD_VIEWS_IN_SESSION_MODE_SOFT_WEAK.equals(cacheMode))
+                {
+                    _oldSerializedViews = new ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.WEAK, true);
+                }
+                else if (CACHE_OLD_VIEWS_IN_SESSION_MODE_SOFT.equals(cacheMode))
+                {
+                    _oldSerializedViews = new ReferenceMap(AbstractReferenceMap.SOFT, AbstractReferenceMap.SOFT, true);
+                }
+                else if (CACHE_OLD_VIEWS_IN_SESSION_MODE_HARD_SOFT.equals(cacheMode))
+                {
+                    _oldSerializedViews = new ReferenceMap(AbstractReferenceMap.HARD, AbstractReferenceMap.SOFT);
+                }
             }
             return _oldSerializedViews;
         }
-
+        
+        /**
+         * Reads the value of the <code>org.apache.myfaces.CACHE_OLD_VIEWS_IN_SESSION_MODE</code> context parameter.
+         * 
+         * @since 1.2.5
+         * @param context
+         * @return constant indicating caching mode
+         * @see CACHE_OLD_VIEWS_IN_SESSION_MODE
+         */
+        protected String getCacheOldViewsInSessionMode(FacesContext context) {
+            String value = context.getExternalContext().getInitParameter(
+                    CACHE_OLD_VIEWS_IN_SESSION_MODE);
+            if (value == null)
+            {
+                return CACHE_OLD_VIEWS_IN_SESSION_MODE_OFF;
+            }
+            else if (value.equalsIgnoreCase(CACHE_OLD_VIEWS_IN_SESSION_MODE_SOFT))
+            {
+                return CACHE_OLD_VIEWS_IN_SESSION_MODE_SOFT;
+            }
+            else if (value.equalsIgnoreCase(CACHE_OLD_VIEWS_IN_SESSION_MODE_SOFT_WEAK))
+            {
+                return CACHE_OLD_VIEWS_IN_SESSION_MODE_SOFT_WEAK;
+            }            
+            else if (value.equalsIgnoreCase(CACHE_OLD_VIEWS_IN_SESSION_MODE_WEAK))
+            {
+                return CACHE_OLD_VIEWS_IN_SESSION_MODE_WEAK;
+            }
+            else if (value.equalsIgnoreCase(CACHE_OLD_VIEWS_IN_SESSION_MODE_HARD_SOFT))
+            {
+                return CACHE_OLD_VIEWS_IN_SESSION_MODE_HARD_SOFT;
+            }
+            else
+            {
+                return CACHE_OLD_VIEWS_IN_SESSION_MODE_OFF;
+            }
+        }
+        
         public Object get(Integer sequence, String viewId)
         {
             Object key = new SerializedViewKey(viewId, sequence);
             Object value = _serializedViews.get(key);
             if (value == null)
             {
-                value = getOldSerializedViewsMap().get(key);
+                Map<Object,Object> oldSerializedViewMap = getOldSerializedViewsMap();
+                if (oldSerializedViewMap != null)
+                {
+                    value = oldSerializedViewMap.get(key);
+                }
             }
             return value;
         }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/jsp/JspViewHandlerImpl.java Sat Sep 13 16:10:53 2008
@@ -645,8 +645,8 @@
          * <code>beginIndex</code> to index <code>endIndex - 1</code>.
          *
          * @param contentBuffer  the <code>StringBuffer</code> to copy content from
-         * @param begin  the beginning index, inclusive.
-         * @param end  the ending index, exclusive
+         * @param beginIndex  the beginning index, inclusive.
+         * @param endIndex  the ending index, exclusive
          * @param writer  the <code>Writer</code> to write to
          * @throws IOException  if an error occurs writing to specified <code>Writer</code>
          */

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/portlet/SessionMap.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/portlet/SessionMap.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/portlet/SessionMap.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/portlet/SessionMap.java Sat Sep 13 16:10:53 2008
@@ -46,7 +46,7 @@
     {
         PortletSession portletSession = getSession();
         return (portletSession == null)
-               ? null : portletSession.getAttribute(key.toString(), PortletSession.PORTLET_SCOPE);
+               ? null : portletSession.getAttribute(key, PortletSession.PORTLET_SCOPE);
     }
 
     @Override

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/ApplicationMap.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/ApplicationMap.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/ApplicationMap.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/ApplicationMap.java Sat Sep 13 16:10:53 2008
@@ -32,26 +32,26 @@
  * @author Anton Koinov (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-public class ApplicationMap extends AbstractAttributeMap<Object>
+public final class ApplicationMap extends AbstractAttributeMap<Object>
 {
     final ServletContext _servletContext;
 
-    ApplicationMap(ServletContext servletContext)
+    ApplicationMap(final ServletContext servletContext)
     {
         _servletContext = servletContext;
     }
 
-    protected Object getAttribute(String key)
+    protected Object getAttribute(final String key)
     {
         return _servletContext.getAttribute(key);
     }
 
-    protected void setAttribute(String key, Object value)
+    protected void setAttribute(final String key, final Object value)
     {
         _servletContext.setAttribute(key, value);
     }
 
-    protected void removeAttribute(String key)
+    protected void removeAttribute(final String key)
     {
         _servletContext.removeAttribute(key);
     }
@@ -63,7 +63,7 @@
     }
 
 
-    public void putAll(Map t)
+    public void putAll(final Map t)
     {
         throw new UnsupportedOperationException();
     }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/CookieMap.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/CookieMap.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/CookieMap.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/CookieMap.java Sat Sep 13 16:10:53 2008
@@ -34,13 +34,13 @@
  * @author Anton Koinov
  * @version $Revision$ $Date$
  */
-public class CookieMap extends AbstractAttributeMap<Cookie>
+public final class CookieMap extends AbstractAttributeMap<Cookie>
 {
     private static final Cookie[] EMPTY_ARRAY = new Cookie[0];
 
-    final HttpServletRequest _httpServletRequest;
+    private final HttpServletRequest _httpServletRequest;
 
-    CookieMap(HttpServletRequest httpServletRequest)
+    CookieMap(final HttpServletRequest httpServletRequest)
     {
         _httpServletRequest = httpServletRequest;
     }
@@ -51,30 +51,15 @@
             "Cannot clear HttpRequest Cookies");
     }
 
-    public boolean containsKey(Object key)
-    {
-        Cookie[] cookies = _httpServletRequest.getCookies();
-        if (cookies == null) return false;
-        for (int i = 0, len = cookies.length; i < len; i++)
-        {
-            if (cookies[i].getName().equals(key))
-            {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
     @Override
-    public boolean containsValue(Object findValue)
+    public boolean containsValue(final Object findValue)
     {
         if (findValue == null)
         {
             return false;
         }
 
-        Cookie[] cookies = _httpServletRequest.getCookies();
+        final Cookie[] cookies = _httpServletRequest.getCookies();
         if (cookies == null)
             return false;
         for (int i = 0, len = cookies.length; i < len; i++)
@@ -91,27 +76,27 @@
     @Override
     public boolean isEmpty()
     {
-        Cookie[] cookies = _httpServletRequest.getCookies();
+        final Cookie[] cookies = _httpServletRequest.getCookies();
         return cookies == null || cookies.length == 0;
     }
 
     @Override
     public int size()
     {
-        Cookie[] cookies = _httpServletRequest.getCookies();
+        final Cookie[] cookies = _httpServletRequest.getCookies();
         return cookies == null ? 0 : cookies.length;
     }
 
     @Override
-    public void putAll(Map t)
+    public void putAll(final Map t)
     {
         throw new UnsupportedOperationException();
     }
 
     @Override
-    protected Cookie getAttribute(String key)
+    protected Cookie getAttribute(final String key)
     {
-        Cookie[] cookies = _httpServletRequest.getCookies();
+        final Cookie[] cookies = _httpServletRequest.getCookies();
         if (cookies == null)
             return null;
         for (int i = 0, len = cookies.length; i < len; i++)
@@ -125,13 +110,13 @@
         return null;
     }
 
-    protected void setAttribute(String key, Cookie value)
+    protected void setAttribute(final String key, final Cookie value)
     {
         throw new UnsupportedOperationException(
             "Cannot set HttpRequest Cookies");
     }
 
-    protected void removeAttribute(String key)
+    protected void removeAttribute(final String key)
     {
         throw new UnsupportedOperationException(
             "Cannot remove HttpRequest Cookies");
@@ -139,7 +124,7 @@
 
     protected Enumeration<String> getAttributeNames()
     {
-        Cookie[] cookies = _httpServletRequest.getCookies();
+        final Cookie[] cookies = _httpServletRequest.getCookies();
 
         return cookies == null ? new CookieNameEnumeration(EMPTY_ARRAY) : new CookieNameEnumeration(cookies);
   
@@ -151,7 +136,7 @@
         private final int _length;
         private int _index;
 
-        public CookieNameEnumeration(Cookie[] cookies)
+        public CookieNameEnumeration(final Cookie[] cookies)
         {
             _cookies = cookies;
             _length = cookies.length;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/FacesContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/FacesContextImpl.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/FacesContextImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/FacesContextImpl.java Sat Sep 13 16:10:53 2008
@@ -72,25 +72,25 @@
 
     //~ Constructors -------------------------------------------------------------------------------
 
-    public FacesContextImpl(PortletContext portletContext,
-                                   PortletRequest portletRequest,
-                                   PortletResponse portletResponse)
+    public FacesContextImpl(final PortletContext portletContext,
+                            final PortletRequest portletRequest,
+                            final PortletResponse portletResponse)
     {
         this(new PortletExternalContextImpl(portletContext,
                                             portletRequest,
                                             portletResponse));
     }
 
-    public FacesContextImpl(ServletContext servletContext,
-                                   ServletRequest servletRequest,
-                                   ServletResponse servletResponse)
+    public FacesContextImpl(final ServletContext servletContext,
+                            final ServletRequest servletRequest,
+                            final ServletResponse servletResponse)
     {
         this(new ServletExternalContextImpl(servletContext,
                                             servletRequest,
                                             servletResponse));
     }
 
-    private FacesContextImpl(ReleaseableExternalContext externalContext)
+    private FacesContextImpl(final ReleaseableExternalContext externalContext)
     {
         _application = ((ApplicationFactory)FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY))
                 .getApplication();
@@ -101,7 +101,7 @@
 
     //~ Methods ------------------------------------------------------------------------------------
 
-    public ExternalContext getExternalContext()
+    public final ExternalContext getExternalContext()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -109,7 +109,7 @@
         return (ExternalContext)_externalContext;
     }
 
-    public FacesMessage.Severity getMaximumSeverity()
+    public final FacesMessage.Severity getMaximumSeverity()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -117,7 +117,7 @@
         return _maximumSeverity;
     }
 
-    public Iterator getMessages()
+    public final Iterator getMessages()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -125,7 +125,7 @@
         return (_messages != null) ? _messages.iterator() : Collections.EMPTY_LIST.iterator();
     }
 
-    public Application getApplication()
+    public final Application getApplication()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -134,7 +134,7 @@
         return _application;
     }
 
-    public Iterator getClientIdsWithMessages()
+    public final Iterator getClientIdsWithMessages()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -148,7 +148,7 @@
         return uniqueClientIds.iterator();
     }
 
-    public Iterator getMessages(String clientId)
+    public final Iterator getMessages(final String clientId)
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -174,7 +174,7 @@
         return lst.iterator();
     }
 
-    public RenderKit getRenderKit()
+    public final RenderKit getRenderKit()
     {
         if (getViewRoot() == null)
         {
@@ -191,7 +191,7 @@
         return _renderKitFactory.getRenderKit(this, renderKitId);
     }
 
-    public boolean getRenderResponse()
+    public final boolean getRenderResponse()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -199,7 +199,7 @@
         return _renderResponse;
     }
 
-    public boolean getResponseComplete()
+    public final boolean getResponseComplete()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -207,7 +207,7 @@
         return _responseComplete;
     }
 
-    public void setResponseStream(ResponseStream responseStream)
+    public final void setResponseStream(final ResponseStream responseStream)
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -219,7 +219,7 @@
         _responseStream = responseStream;
     }
 
-    public ResponseStream getResponseStream()
+    public final ResponseStream getResponseStream()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -227,7 +227,7 @@
         return _responseStream;
     }
 
-    public void setResponseWriter(ResponseWriter responseWriter)
+    public final void setResponseWriter(final ResponseWriter responseWriter)
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -239,7 +239,7 @@
         _responseWriter = responseWriter;
     }
 
-    public ResponseWriter getResponseWriter()
+    public final ResponseWriter getResponseWriter()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -247,7 +247,7 @@
         return _responseWriter;
     }
 
-    public void setViewRoot(UIViewRoot viewRoot)
+    public final void setViewRoot(final UIViewRoot viewRoot)
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -259,7 +259,7 @@
         _viewRoot = viewRoot;
     }
 
-    public UIViewRoot getViewRoot()
+    public final UIViewRoot getViewRoot()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -267,7 +267,7 @@
         return _viewRoot;
     }
 
-    public void addMessage(String clientId, FacesMessage message)
+    public final void addMessage(final String clientId, final FacesMessage message)
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -297,7 +297,7 @@
         }
     }
 
-    public void release()
+    public final void release()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -319,7 +319,7 @@
         FacesContext.setCurrentInstance(null);
     }
 
-    public void renderResponse()
+    public final void renderResponse()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -327,7 +327,7 @@
         _renderResponse = true;
     }
 
-    public void responseComplete()
+    public final void responseComplete()
     {
         if (_released) {
             throw new IllegalStateException("FacesContext already released");
@@ -337,13 +337,13 @@
 
     // Portlet need to do this to change from ActionRequest/Response to
     // RenderRequest/Response
-    public void setExternalContext(ReleaseableExternalContext extContext)
+    public final void setExternalContext(ReleaseableExternalContext extContext)
     {
         _externalContext = extContext;
         FacesContext.setCurrentInstance(this); //TODO: figure out if I really need to do this
     }
 
-    public ELContext getELContext() {
+    public final ELContext getELContext() {
         if (_elContext != null) return _elContext;
         
         

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/InitParameterMap.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/InitParameterMap.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/InitParameterMap.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/InitParameterMap.java Sat Sep 13 16:10:53 2008
@@ -32,27 +32,27 @@
  * @author Anton Koinov (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-public class InitParameterMap extends AbstractAttributeMap<String>
+public final class InitParameterMap extends AbstractAttributeMap<String>
 {
-    final ServletContext _servletContext;
+    private final ServletContext _servletContext;
 
-    InitParameterMap(ServletContext servletContext)
+    InitParameterMap(final ServletContext servletContext)
     {
         _servletContext = servletContext;
     }
 
-    protected String getAttribute(String key)
+    protected String getAttribute(final String key)
     {
         return _servletContext.getInitParameter(key);
     }
 
-    protected void setAttribute(String key, String value)
+    protected void setAttribute(final String key, final String value)
     {
         throw new UnsupportedOperationException(
             "Cannot set ServletContext InitParameter");
     }
 
-    protected void removeAttribute(String key)
+    protected void removeAttribute(final String key)
     {
         throw new UnsupportedOperationException(
             "Cannot remove ServletContext InitParameter");
@@ -64,7 +64,7 @@
         return _servletContext.getInitParameterNames();
     }
     
-    public void putAll(Map t)
+    public void putAll(final Map t)
     {
         throw new UnsupportedOperationException();
     }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestHeaderMap.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestHeaderMap.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestHeaderMap.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestHeaderMap.java Sat Sep 13 16:10:53 2008
@@ -32,30 +32,30 @@
  * @author Anton Koinov (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-public class RequestHeaderMap extends AbstractAttributeMap<String>
+public final class RequestHeaderMap extends AbstractAttributeMap<String>
 {
     private final HttpServletRequest _httpServletRequest;
 
-    RequestHeaderMap(HttpServletRequest httpServletRequest)
+    RequestHeaderMap(final HttpServletRequest httpServletRequest)
     {
         _httpServletRequest = httpServletRequest;
     }
 
     @Override
-    protected String getAttribute(String key)
+    protected String getAttribute(final String key)
     {
         return _httpServletRequest.getHeader(key);
     }
 
     @Override
-    protected void setAttribute(String key, String value)
+    protected void setAttribute(final String key, final String value)
     {
         throw new UnsupportedOperationException(
             "Cannot set HttpServletRequest Header");
     }
 
     @Override
-    protected void removeAttribute(String key)
+    protected void removeAttribute(final String key)
     {
         throw new UnsupportedOperationException(
             "Cannot remove HttpServletRequest Header");
@@ -69,7 +69,7 @@
     }
 
     @Override
-    public void putAll(Map t)
+    public void putAll(final Map t)
     {
         throw new UnsupportedOperationException();
     }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestHeaderValuesMap.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestHeaderValuesMap.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestHeaderValuesMap.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestHeaderValuesMap.java Sat Sep 13 16:10:53 2008
@@ -34,17 +34,17 @@
  * @author Anton Koinov (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-public class RequestHeaderValuesMap extends AbstractAttributeMap<String[]>
+public final class RequestHeaderValuesMap extends AbstractAttributeMap<String[]>
 {
     private final HttpServletRequest _httpServletRequest;
     private final Map<String, String[]> _valueCache = new HashMap<String, String[]>();
 
-    RequestHeaderValuesMap(HttpServletRequest httpServletRequest)
+    RequestHeaderValuesMap(final HttpServletRequest httpServletRequest)
     {
         _httpServletRequest = httpServletRequest;
     }
 
-    protected String[] getAttribute(String key)
+    protected String[] getAttribute(final String key)
     {
         String[] ret = _valueCache.get(key);
         if (ret == null)
@@ -55,12 +55,12 @@
         return ret;
     }
 
-    protected void setAttribute(String key, String[] value)
+    protected void setAttribute(final String key, final String[] value)
     {
         throw new UnsupportedOperationException("Cannot set HttpServletRequest HeaderValues");
     }
 
-    protected void removeAttribute(String key)
+    protected void removeAttribute(final String key)
     {
         throw new UnsupportedOperationException("Cannot remove HttpServletRequest HeaderValues");
     }
@@ -80,6 +80,6 @@
             ret.add(e.nextElement());
         }
 
-        return (String[]) ret.toArray(new String[ret.size()]);
+        return ret.toArray(new String[ret.size()]);
     }
 }
\ No newline at end of file

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestMap.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestMap.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestMap.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestMap.java Sat Sep 13 16:10:53 2008
@@ -32,29 +32,29 @@
  * @author Anton Koinov (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-public class RequestMap extends AbstractAttributeMap<Object>
+public final class RequestMap extends AbstractAttributeMap<Object>
 {
     final ServletRequest _servletRequest;
 
-    RequestMap(ServletRequest servletRequest)
+    RequestMap(final ServletRequest servletRequest)
     {
         _servletRequest = servletRequest;
     }
 
     @Override
-    protected Object getAttribute(String key)
+    protected Object getAttribute(final String key)
     {
         return _servletRequest.getAttribute(key);
     }
 
     @Override
-    protected void setAttribute(String key, Object value)
+    protected void setAttribute(final String key, final Object value)
     {
         _servletRequest.setAttribute(key, value);
     }
 
     @Override
-    protected void removeAttribute(String key)
+    protected void removeAttribute(final String key)
     {
         _servletRequest.removeAttribute(key);
     }
@@ -67,7 +67,7 @@
     }
 
     @Override
-    public void putAll(Map t)
+    public void putAll(final Map t)
     {
         throw new UnsupportedOperationException();
     }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestParameterMap.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestParameterMap.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestParameterMap.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestParameterMap.java Sat Sep 13 16:10:53 2008
@@ -30,30 +30,30 @@
  * @author Anton Koinov (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-public class RequestParameterMap extends AbstractAttributeMap<String>
+public final class RequestParameterMap extends AbstractAttributeMap<String>
 {
     private final ServletRequest _servletRequest;
 
-    RequestParameterMap(ServletRequest servletRequest)
+    RequestParameterMap(final ServletRequest servletRequest)
     {
         _servletRequest = servletRequest;
     }
 
     @Override
-    protected String getAttribute(String key)
+    protected String getAttribute(final String key)
     {
         return _servletRequest.getParameter(key);
     }
 
     @Override
-    protected void setAttribute(String key, String value)
+    protected void setAttribute(final String key, final String value)
     {
         throw new UnsupportedOperationException(
             "Cannot set ServletRequest Parameter");
     }
 
     @Override
-    protected void removeAttribute(String key)
+    protected void removeAttribute(final String key)
     {
         throw new UnsupportedOperationException(
             "Cannot remove ServletRequest Parameter");

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestParameterValuesMap.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestParameterValuesMap.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestParameterValuesMap.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/RequestParameterValuesMap.java Sat Sep 13 16:10:53 2008
@@ -30,30 +30,30 @@
  * @author Anton Koinov (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-public class RequestParameterValuesMap extends AbstractAttributeMap<String[]>
+public final class RequestParameterValuesMap extends AbstractAttributeMap<String[]>
 {
     private final ServletRequest _servletRequest;
 
-    RequestParameterValuesMap(ServletRequest servletRequest)
+    RequestParameterValuesMap(final ServletRequest servletRequest)
     {
         _servletRequest = servletRequest;
     }
 
     @Override
-    protected String[] getAttribute(String key)
+    protected String[] getAttribute(final String key)
     {
         return _servletRequest.getParameterValues(key);
     }
 
     @Override
-    protected void setAttribute(String key, String[] value)
+    protected void setAttribute(final String key, final String[] value)
     {
         throw new UnsupportedOperationException(
             "Cannot set ServletRequest ParameterValues");
     }
 
     @Override
-    protected void removeAttribute(String key)
+    protected void removeAttribute(final String key)
     {
         throw new UnsupportedOperationException(
             "Cannot remove ServletRequest ParameterValues");

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java Sat Sep 13 16:10:53 2008
@@ -49,7 +49,7 @@
  * @author Anton Koinov
  * @version $Revision$ $Date$
  */
-public class ServletExternalContextImpl extends ExternalContext implements ReleaseableExternalContext
+public final class ServletExternalContextImpl extends ExternalContext implements ReleaseableExternalContext
 {
     private static final String INIT_PARAMETER_MAP_ATTRIBUTE = InitParameterMap.class.getName();
 
@@ -69,8 +69,8 @@
     private String _requestServletPath;
     private String _requestPathInfo;
 
-    public ServletExternalContextImpl(ServletContext servletContext, ServletRequest servletRequest,
-            ServletResponse servletResponse)
+    public ServletExternalContextImpl(final ServletContext servletContext, final ServletRequest servletRequest,
+            final ServletResponse servletResponse)
     {
         _servletContext = servletContext;
         _servletRequest = servletRequest;
@@ -265,7 +265,7 @@
     }
 
     @Override
-    public String getInitParameter(String s)
+    public String getInitParameter(final String s)
     {
         return _servletContext.getInitParameter(s);
     }
@@ -288,21 +288,21 @@
 
     @Override
     @SuppressWarnings("unchecked")
-    public Set<String> getResourcePaths(String path)
+    public Set<String> getResourcePaths(final String path)
     {
         checkNull(path, "path");
         return _servletContext.getResourcePaths(path);
     }
 
     @Override
-    public InputStream getResourceAsStream(String path)
+    public InputStream getResourceAsStream(final String path)
     {
         checkNull(path, "path");
         return _servletContext.getResourceAsStream(path);
     }
 
     @Override
-    public String encodeActionURL(String url)
+    public String encodeActionURL(final String url)
     {
         checkNull(url, "url");
         checkHttpServletRequest();
@@ -310,7 +310,7 @@
     }
 
     @Override
-    public String encodeResourceURL(String url)
+    public String encodeResourceURL(final String url)
     {
         checkNull(url, "url");
         checkHttpServletRequest();
@@ -318,13 +318,13 @@
     }
 
     @Override
-    public String encodeNamespace(String s)
+    public String encodeNamespace(final String s)
     {
         return s;
     }
 
     @Override
-    public void dispatch(String requestURI) throws IOException, FacesException
+    public void dispatch(final String requestURI) throws IOException, FacesException
     {
         RequestDispatcher requestDispatcher = _servletRequest.getRequestDispatcher(requestURI);
 
@@ -376,7 +376,7 @@
     }
 
     @Override
-    public boolean isUserInRole(String role)
+    public boolean isUserInRole(final String role)
     {
         checkNull(role, "role");
         checkHttpServletRequest();
@@ -391,14 +391,14 @@
     }
 
     @Override
-    public void log(String message)
+    public void log(final String message)
     {
         checkNull(message, "message");
         _servletContext.log(message);
     }
 
     @Override
-    public void log(String message, Throwable exception)
+    public void log(final String message, final Throwable exception)
     {
         checkNull(message, "message");
         checkNull(exception, "exception");
@@ -406,7 +406,7 @@
     }
 
     @Override
-    public void redirect(String url) throws IOException
+    public void redirect(final String url) throws IOException
     {
         if (_servletResponse instanceof HttpServletResponse)
         {
@@ -427,7 +427,7 @@
     }
 
     @Override
-    public URL getResource(String path) throws MalformedURLException
+    public URL getResource(final String path) throws MalformedURLException
     {
         checkNull(path, "path");
         return _servletContext.getResource(path);
@@ -438,7 +438,7 @@
      * @param request
      */
     @Override
-    public void setRequest(java.lang.Object request)
+    public void setRequest(final java.lang.Object request)
     {
         this._servletRequest = (ServletRequest) request;
         this._httpServletRequest = isHttpServletRequest(_servletRequest) ? (HttpServletRequest) _servletRequest : null;
@@ -451,7 +451,7 @@
      * @throws java.io.UnsupportedEncodingException
      */
     @Override
-    public void setRequestCharacterEncoding(java.lang.String encoding) throws java.io.UnsupportedEncodingException
+    public void setRequestCharacterEncoding(final java.lang.String encoding) throws java.io.UnsupportedEncodingException
     {
 
         this._servletRequest.setCharacterEncoding(encoding);
@@ -481,7 +481,7 @@
      * @param response
      */
     @Override
-    public void setResponse(java.lang.Object response)
+    public void setResponse(final java.lang.Object response)
     {
         this._servletResponse = (ServletResponse) response;
     }
@@ -491,12 +491,12 @@
      * @param encoding
      */
     @Override
-    public void setResponseCharacterEncoding(java.lang.String encoding)
+    public void setResponseCharacterEncoding(final java.lang.String encoding)
     {
         this._servletResponse.setCharacterEncoding(encoding);
     }
 
-    private void checkNull(Object o, String param)
+    private void checkNull(final Object o, final String param)
     {
         if (o == null)
         {
@@ -512,7 +512,7 @@
         }
     }
 
-    private boolean isHttpServletRequest(ServletRequest servletRequest)
+    private boolean isHttpServletRequest(final ServletRequest servletRequest)
     {
         return servletRequest instanceof HttpServletRequest;
     }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/SessionMap.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/SessionMap.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/SessionMap.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/context/servlet/SessionMap.java Sat Sep 13 16:10:53 2008
@@ -34,32 +34,32 @@
  * @author Anton Koinov (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-public class SessionMap extends AbstractAttributeMap<Object>
+public final class SessionMap extends AbstractAttributeMap<Object>
 {
     private final HttpServletRequest _httpRequest;
 
-    SessionMap(HttpServletRequest httpRequest)
+    SessionMap(final HttpServletRequest httpRequest)
     {
         _httpRequest = httpRequest;
     }
 
     @Override
-    protected Object getAttribute(String key)
+    protected Object getAttribute(final String key)
     {
-        HttpSession httpSession = getSession();
-        return (httpSession == null) ? null : httpSession.getAttribute(key.toString());
+        final HttpSession httpSession = getSession();
+        return (httpSession == null) ? null : httpSession.getAttribute(key);
     }
 
     @Override
-    protected void setAttribute(String key, Object value)
+    protected void setAttribute(final String key, final Object value)
     {
         _httpRequest.getSession(true).setAttribute(key, value);
     }
 
     @Override
-    protected void removeAttribute(String key)
+    protected void removeAttribute(final String key)
     {
-        HttpSession httpSession = getSession();
+        final HttpSession httpSession = getSession();
         if (httpSession != null)
         {
             httpSession.removeAttribute(key);
@@ -70,7 +70,7 @@
     @SuppressWarnings("unchecked")
     protected Enumeration<String> getAttributeNames()
     {
-        HttpSession httpSession = getSession();
+        final HttpSession httpSession = getSession();
         return (httpSession == null) ? NullEnumeration.instance() : httpSession.getAttributeNames();
     }
 
@@ -80,7 +80,7 @@
     }
 
     @Override
-    public void putAll(Map t)
+    public void putAll(final Map t)
     {
         throw new UnsupportedOperationException();
     }
@@ -91,12 +91,12 @@
     @Override
     public void clear()
     {
-        HttpSession session = getSession();
+        final HttpSession session = getSession();
         if (session == null)
             return;
-        for (Enumeration attributeNames = session.getAttributeNames(); attributeNames.hasMoreElements();)
+        for (final Enumeration attributeNames = session.getAttributeNames(); attributeNames.hasMoreElements();)
         {
-            String attributeName = (String) attributeNames.nextElement();
+            final String attributeName = (String) attributeNames.nextElement();
             session.removeAttribute(attributeName);
         }
     }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/convert/ConverterUtils.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/convert/ConverterUtils.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/convert/ConverterUtils.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/convert/ConverterUtils.java Sat Sep 13 16:10:53 2008
@@ -36,13 +36,13 @@
     {
         if (value instanceof Number)
         {
-            return ((Number)value).intValue();
+            return ((Number) value).intValue();
         }
         else if (value instanceof String)
         {
             try
             {
-                return Integer.parseInt((String)value);
+                return Integer.parseInt((String) value);
             }
             catch (NumberFormatException e)
             {
@@ -59,13 +59,13 @@
     {
         if (value instanceof Boolean)
         {
-            return ((Boolean)value).booleanValue();
+            return ((Boolean) value);
         }
         else if (value instanceof String)
         {
             try
             {
-                return new Boolean((String)value).booleanValue();
+                return Boolean.parseBoolean((String) value);
             }
             catch (Exception e)
             {
@@ -82,13 +82,13 @@
     {
         if (value instanceof Number)
         {
-            return ((Number)value).longValue();
+            return ((Number) value).longValue();
         }
         else if (value instanceof String)
         {
             try
             {
-                return Long.parseLong((String)value);
+                return Long.parseLong((String) value);
             }
             catch (NumberFormatException e)
             {
@@ -105,13 +105,13 @@
     {
         if (value instanceof Number)
         {
-            return ((Number)value).doubleValue();
+            return ((Number) value).doubleValue();
         }
         else if (value instanceof String)
         {
             try
             {
-                return Double.parseDouble((String)value);
+                return Double.parseDouble((String) value);
             }
             catch (NumberFormatException e)
             {

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/CompositeELResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/CompositeELResolver.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/CompositeELResolver.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/CompositeELResolver.java Sat Sep 13 16:10:53 2008
@@ -37,7 +37,7 @@
     private Collection<ELResolver> _elResolvers = Collections.EMPTY_LIST;
 
     @Override
-    public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)
+    public Iterator<FeatureDescriptor> getFeatureDescriptors(final ELContext context, final Object base)
     {
         return new CompositeIterator(context, base, _elResolvers.iterator());
     }
@@ -45,7 +45,7 @@
     /**
      * @param elResolver
      */
-    public void add(ELResolver elResolver)
+    public final void add(final ELResolver elResolver)
     {
         super.add(elResolver);
 
@@ -67,7 +67,7 @@
 
         private Iterator<FeatureDescriptor> _currentFDIter;
 
-        public CompositeIterator(ELContext context, Object base, Iterator<ELResolver> elResolvers)
+        public CompositeIterator(final ELContext context, final Object base, final Iterator<ELResolver> elResolvers)
         {
             _context = context;
             _base = base;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/DefaultPropertyResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/DefaultPropertyResolver.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/DefaultPropertyResolver.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/DefaultPropertyResolver.java Sat Sep 13 16:10:53 2008
@@ -30,7 +30,7 @@
  * @version $Revision$ $Date$
  */
 @SuppressWarnings("deprecation")
-public class DefaultPropertyResolver extends PropertyResolver
+public final class DefaultPropertyResolver extends PropertyResolver
 {
     private void updatePropertyResolved()
     {

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/NullPropertyResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/NullPropertyResolver.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/NullPropertyResolver.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/NullPropertyResolver.java Sat Sep 13 16:10:53 2008
@@ -29,7 +29,7 @@
  *
  * @author Stan Silvert
  */
-public class NullPropertyResolver extends PropertyResolver {
+public final class NullPropertyResolver extends PropertyResolver {
     
     /** Creates a new instance of NullPropertyResolver */
     public NullPropertyResolver() {

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/PropertyResolverImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/PropertyResolverImpl.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/PropertyResolverImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/PropertyResolverImpl.java Sat Sep 13 16:10:53 2008
@@ -34,7 +34,7 @@
  * @version $Revision$ $Date$
  */
 @SuppressWarnings("deprecation")
-public class PropertyResolverImpl extends PropertyResolver
+public final class PropertyResolverImpl extends PropertyResolver
 {
     // ~ Public PropertyResolver Methods
     // ----------------------------------------
@@ -55,7 +55,7 @@
     @Override
     public Object getValue(final Object base, final int index) throws EvaluationException, PropertyNotFoundException
     {
-        return getValue(base, new Integer(index));
+        return getValue(base, Integer.valueOf(index));
     }
 
     @Override
@@ -98,7 +98,7 @@
             }
         }
         
-        setValue(base, new Integer(index), newValue);
+        setValue(base, Integer.valueOf(index), newValue);
     }
 
     @Override
@@ -114,9 +114,9 @@
     }
 
     @Override
-    public boolean isReadOnly(Object base, int index)
+    public boolean isReadOnly(final Object base, final int index)
     {
-        return isReadOnly(base, new Integer(index));
+        return isReadOnly(base, Integer.valueOf(index));
     }
 
     @Override
@@ -127,7 +127,7 @@
         
         return invokeResolver(new ResolverInvoker<Class>(base, property)
         {
-            public Class invoke(ELResolver resolver, ELContext context)
+            public Class invoke(final ELResolver resolver, final ELContext context)
             {
                 return resolver.getType(context, base, property);
             }
@@ -150,7 +150,7 @@
             }
         }
         
-        return getType(base, new Integer(index));
+        return getType(base, Integer.valueOf(index));
     }
     
     // ~ Internal Helper Methods
@@ -197,7 +197,7 @@
         private final Object _base;
         private final Object _property;
 
-        ResolverInvoker(Object base, Object property)
+        ResolverInvoker(final Object base, final Object property)
         {
             _base = base;
             _property = property;

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/ResolverForJSPInitializer.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/ResolverForJSPInitializer.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/ResolverForJSPInitializer.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/ResolverForJSPInitializer.java Sat Sep 13 16:10:53 2008
@@ -34,19 +34,19 @@
  * @author Mathias Broekelmann (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-public class ResolverForJSPInitializer implements PhaseListener
+public final class ResolverForJSPInitializer implements PhaseListener
 {
     private final ELResolverBuilder _resolverBuilder;
     private boolean initialized;
     private final javax.el.CompositeELResolver _resolverForJSP;
 
-    public ResolverForJSPInitializer(ELResolverBuilder resolverBuilder, javax.el.CompositeELResolver resolverForJSP)
+    public ResolverForJSPInitializer(final ELResolverBuilder resolverBuilder, final javax.el.CompositeELResolver resolverForJSP)
     {
         _resolverBuilder = resolverBuilder;
         _resolverForJSP = resolverForJSP;
     }
 
-    public void beforePhase(PhaseEvent event)
+    public void beforePhase(final PhaseEvent event)
     {
         if (!initialized)
         {
@@ -61,7 +61,7 @@
         }
     }
 
-    public void afterPhase(PhaseEvent event)
+    public void afterPhase(final PhaseEvent event)
     {
     }
 

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/VariableResolverImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/VariableResolverImpl.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/VariableResolverImpl.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/VariableResolverImpl.java Sat Sep 13 16:10:53 2008
@@ -40,10 +40,10 @@
  * @version $Revision$ $Date$
  */
 @SuppressWarnings("deprecation")
-public class VariableResolverImpl extends VariableResolver
+public final class VariableResolverImpl extends VariableResolver
 {
     @Override
-    public Object resolveVariable(FacesContext context, String name) throws EvaluationException
+    public Object resolveVariable(final FacesContext context, final String name) throws EvaluationException
     {
         if (context == null)
         {
@@ -56,9 +56,9 @@
 
         try
         {
-            Scope scope = getScope(context);
-            ELContext elcontext = context.getELContext();
-            Application application = context.getApplication();
+            final Scope scope = getScope(context);
+            final ELContext elcontext = context.getELContext();
+            final Application application = context.getApplication();
             if (Scope.Faces.equals(scope))
             {
                 return application.getELResolver().getValue(elcontext, null, name);
@@ -80,7 +80,7 @@
         }
     }
 
-    protected Scope getScope(FacesContext context)
+    protected Scope getScope(final FacesContext context)
     {
         return (Scope) context.getExternalContext().getRequestMap().get(Scope.class.getName());
     }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ELResolverToPropertyResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ELResolverToPropertyResolver.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ELResolverToPropertyResolver.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ELResolverToPropertyResolver.java Sat Sep 13 16:10:53 2008
@@ -30,22 +30,22 @@
  *
  * @author Stan Silvert
  */
-public class ELResolverToPropertyResolver extends PropertyResolver {
+public final class ELResolverToPropertyResolver extends PropertyResolver {
     
-    private ELResolver elResolver;
+    private final ELResolver elResolver;
     
     /**
      * Creates a new instance of ELResolverToPropertyResolver
      */
-    public ELResolverToPropertyResolver(ELResolver elResolver) {
+    public ELResolverToPropertyResolver(final ELResolver elResolver) {
         this.elResolver = elResolver;
     }
 
-    public boolean isReadOnly(Object base, int index) 
+    public boolean isReadOnly(final Object base, final int index)
         throws EvaluationException, PropertyNotFoundException {
         
         try {
-            return elResolver.isReadOnly(elContext(), base, new Integer(index));
+            return elResolver.isReadOnly(elContext(), base, Integer.valueOf(index));
         } catch (javax.el.PropertyNotFoundException e) {
             throw new javax.faces.el.PropertyNotFoundException(e);
         } catch (ELException e) {
@@ -54,7 +54,7 @@
         
     }
     
-    public boolean isReadOnly(Object base, Object property) 
+    public boolean isReadOnly(final Object base, final Object property)
         throws EvaluationException, PropertyNotFoundException {
         
         try {
@@ -67,11 +67,11 @@
         
     }
 
-    public Object getValue(Object base, int index) 
+    public Object getValue(final Object base, final int index)
         throws EvaluationException, PropertyNotFoundException {
         
         try {
-            return elResolver.getValue(elContext(), base, new Integer(index));
+            return elResolver.getValue(elContext(), base, Integer.valueOf(index));
         } catch (javax.el.PropertyNotFoundException e) {
             throw new javax.faces.el.PropertyNotFoundException(e);
         } catch (ELException e) {
@@ -80,7 +80,7 @@
         
     }
 
-    public Object getValue(Object base, Object property) 
+    public Object getValue(final Object base, final Object property)
         throws EvaluationException, PropertyNotFoundException {
         
         try {
@@ -92,11 +92,11 @@
         }
     }
     
-    public Class getType(Object base, int index) 
+    public Class getType(final Object base, int index)
         throws EvaluationException, PropertyNotFoundException {
         
         try {
-            return elResolver.getType(elContext(), base, new Integer(index));
+            return elResolver.getType(elContext(), base, Integer.valueOf(index));
         } catch (javax.el.PropertyNotFoundException e) {
             throw new javax.faces.el.PropertyNotFoundException(e);
         } catch (ELException e) {
@@ -104,7 +104,7 @@
         }
     }
     
-    public Class getType(Object base, Object property) 
+    public Class getType(final Object base, final Object property)
         throws EvaluationException, PropertyNotFoundException {
         
         try {
@@ -116,7 +116,7 @@
         }
     }
 
-    public void setValue(Object base, Object property, Object value) 
+    public void setValue(final Object base, final Object property, final Object value)
         throws EvaluationException, PropertyNotFoundException {
         
         try {
@@ -128,11 +128,11 @@
         }
     }
 
-    public void setValue(Object base, int index, Object value) 
+    public void setValue(final Object base, int index, final Object value)
         throws EvaluationException, PropertyNotFoundException {
         
         try {
-            elResolver.setValue(elContext(), base, new Integer(index), value);
+            elResolver.setValue(elContext(), base, Integer.valueOf(index), value);
         } catch (javax.el.PropertyNotFoundException e) {
             throw new javax.faces.el.PropertyNotFoundException(e);
         } catch (ELException e) {

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ELResolverToVariableResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ELResolverToVariableResolver.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ELResolverToVariableResolver.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ELResolverToVariableResolver.java Sat Sep 13 16:10:53 2008
@@ -31,19 +31,19 @@
  *
  * @author Stan Silvert
  */
-public class ELResolverToVariableResolver extends VariableResolver {
+public final class ELResolverToVariableResolver extends VariableResolver {
     
-    private ELResolver elResolver;
+    private final ELResolver elResolver;
     
     /**
      * Creates a new instance of ELResolverToVariableResolver
      */
-    public ELResolverToVariableResolver(ELResolver elResolver) {
+    public ELResolverToVariableResolver(final ELResolver elResolver) {
         if (elResolver == null) throw new NullPointerException();
         this.elResolver = elResolver;
     }
 
-    public Object resolveVariable(FacesContext facesContext, String name) throws EvaluationException {
+    public Object resolveVariable(final FacesContext facesContext, final String name) throws EvaluationException {
         
         try {
             return elResolver.getValue(facesContext.getELContext(), null, name);

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/MethodExpressionToMethodBinding.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/MethodExpressionToMethodBinding.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/MethodExpressionToMethodBinding.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/MethodExpressionToMethodBinding.java Sat Sep 13 16:10:53 2008
@@ -37,7 +37,7 @@
  * @author Stan Silvert
  * @see javax.faces.component._MethodExpressionToMethodBinding
  */
-public class MethodExpressionToMethodBinding extends MethodBinding implements StateHolder {
+public final class MethodExpressionToMethodBinding extends MethodBinding implements StateHolder {
     
     private MethodExpression methodExpression;
     
@@ -48,7 +48,7 @@
     }
 
     /** Creates a new instance of MethodExpressionToMethodBinding */
-    public MethodExpressionToMethodBinding(MethodExpression methodExpression) {
+    public MethodExpressionToMethodBinding(final MethodExpression methodExpression) {
         this.methodExpression = methodExpression;
     }
     
@@ -68,7 +68,7 @@
         }
     }
 
-    public Object invoke(FacesContext facesContext, Object[] params) 
+    public Object invoke(final FacesContext facesContext, final Object[] params)
         throws EvaluationException, MethodNotFoundException {
         
         try {
@@ -82,15 +82,15 @@
 
 // -------- StateHolder methods -------------------------------------------    
     
-    public void restoreState(FacesContext context, Object state) {
+    public void restoreState(final FacesContext context, final Object state) {
         methodExpression = (MethodExpression)state;
     }
 
-    public Object saveState(FacesContext context) {
+    public Object saveState(final FacesContext context) {
         return methodExpression;
     }
 
-    public void setTransient(boolean newTransientValue) {
+    public void setTransient(final boolean newTransientValue) {
         isTransient = newTransientValue;
     }
 

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/PropertyResolverToELResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/PropertyResolverToELResolver.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/PropertyResolverToELResolver.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/PropertyResolverToELResolver.java Sat Sep 13 16:10:53 2008
@@ -29,20 +29,19 @@
 import javax.faces.context.FacesContext;
 import javax.faces.el.EvaluationException;
 import javax.faces.el.PropertyResolver;
-
 import java.beans.FeatureDescriptor;
 import java.util.Iterator;
 import java.util.List;
 
 /**
  * Wrapper that converts a VariableResolver into an ELResolver. See JSF 1.2 spec section 5.6.1.6
- * 
+ *
  * @author Stan Silvert (latest modification by $Author$)
  * @author Mathias Broekelmann
  * @version $Revision$ $Date$
  */
 @SuppressWarnings("deprecation")
-public class PropertyResolverToELResolver extends ELResolver
+public final class PropertyResolverToELResolver extends ELResolver
 {
     private PropertyResolver propertyResolver;
 
@@ -51,92 +50,181 @@
     /**
      * Creates a new instance of PropertyResolverToELResolver
      */
-    public PropertyResolverToELResolver(PropertyResolver propertyResolver)
+    public PropertyResolverToELResolver(final PropertyResolver propertyResolver)
     {
         this.propertyResolver = propertyResolver;
     }
 
     @Override
-    public void setValue(ELContext context, Object base, Object property, final Object value)
-            throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException
+    public void setValue(final ELContext context, final Object base, final Object property, final Object value)
+        throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException
     {
-        invoke(context, base, property, new ResolverInvoker<Object>()
+        if (base == null || property == null)
+        {
+            return;
+        }
+
+        try
         {
-            @Override
-            public Object invoke(Object base, Object property)
+            context.setPropertyResolved(true);
+            if (needsCoersion(base))
+            {
+                propertyResolver.setValue(base, coerceToInt(property), value);
+            } else
             {
-                if (needsCoersion(base))
-                {
-                    propertyResolver.setValue(base, coerceToInt(property), value);
-                }
-                else
-                {
-                    propertyResolver.setValue(base, property, value);
-                }
-                return null;
+                propertyResolver.setValue(base, property, value);
             }
-        });
+            // see: https://issues.apache.org/jira/browse/MYFACES-1670
+            context.setPropertyResolved(
+                FacesContext.getCurrentInstance().getELContext().isPropertyResolved());
+
+        }
+        catch (javax.faces.el.PropertyNotFoundException e)
+        {
+            context.setPropertyResolved(false);
+            throw new PropertyNotFoundException(e.getMessage(), e);
+        }
+        catch (EvaluationException e)
+        {
+            context.setPropertyResolved(false);
+            throw new ELException(e.getMessage(), e);
+        }
+        catch (RuntimeException e)
+        {
+            context.setPropertyResolved(false);
+            throw e;
+        }
     }
 
     @Override
-    public boolean isReadOnly(ELContext context, Object base, Object property) throws NullPointerException,
-            PropertyNotFoundException, ELException
+    public boolean isReadOnly(final ELContext context, final Object base, final Object property) throws NullPointerException,
+        PropertyNotFoundException, ELException
     {
-        return invoke(context, base, property, new ResolverInvoker<Boolean>()
+        if (base == null || property == null)
         {
-            @Override
-            public Boolean invoke(Object base, Object property)
-            {
-                if (needsCoersion(base))
-                {
-                    return propertyResolver.isReadOnly(base, coerceToInt(property));
-                }
-                return propertyResolver.isReadOnly(base, property);
-            }
+            return true;
+        }
 
-            @Override
-            Boolean getValueIfBaseAndPropertyIsNull()
+        try
+        {
+            boolean result;
+            context.setPropertyResolved(true);
+            if (needsCoersion(base))
             {
-                return true;
+                result = propertyResolver.isReadOnly(base, coerceToInt(property));
+            } else
+            {
+                result = propertyResolver.isReadOnly(base, property);
             }
-        });
+
+            // see: https://issues.apache.org/jira/browse/MYFACES-1670
+            context.setPropertyResolved(
+                FacesContext.getCurrentInstance().getELContext().isPropertyResolved());
+            return result;
+        }
+        catch (javax.faces.el.PropertyNotFoundException e)
+        {
+            context.setPropertyResolved(false);
+            throw new PropertyNotFoundException(e.getMessage(), e);
+        }
+        catch (EvaluationException e)
+        {
+            context.setPropertyResolved(false);
+            throw new ELException(e.getMessage(), e);
+        }
+        catch (RuntimeException e)
+        {
+            context.setPropertyResolved(false);
+            throw e;
+        }
     }
 
     @Override
-    public Object getValue(ELContext context, Object base, Object property) throws NullPointerException,
-            PropertyNotFoundException, ELException
+    public Object getValue(final ELContext context, final Object base, final Object property) throws NullPointerException,
+        PropertyNotFoundException, ELException
     {
-        return invoke(context, base, property, new ResolverInvoker<Object>()
+        if (base == null || property == null)
         {
-            @Override
-            Object invoke(Object base, Object property)
+            return null;
+        }
+
+        try
+        {
+            context.setPropertyResolved(true);
+            Object value;
+            if (needsCoersion(base))
+            {
+                value = propertyResolver.getValue(base, coerceToInt(property));
+            } else
             {
-                if (needsCoersion(base))
-                {
-                    return propertyResolver.getValue(base, coerceToInt(property));
-                }
-                return propertyResolver.getValue(base, property);
+                value = propertyResolver.getValue(base, property);
             }
-        });
+
+            // see: https://issues.apache.org/jira/browse/MYFACES-1670
+            context.setPropertyResolved(
+                FacesContext.getCurrentInstance().getELContext().isPropertyResolved());
+
+            return value;
+        }
+        catch (javax.faces.el.PropertyNotFoundException e)
+        {
+            context.setPropertyResolved(false);
+            throw new PropertyNotFoundException(e.getMessage(), e);
+        }
+        catch (EvaluationException e)
+        {
+            context.setPropertyResolved(false);
+            throw new ELException(e.getMessage(), e);
+        }
+        catch (RuntimeException e)
+        {
+            context.setPropertyResolved(false);
+            throw e;
+        }
     }
 
     @Override
-    public Class<?> getType(ELContext context, Object base, Object property) throws NullPointerException,
-            PropertyNotFoundException, ELException
+    public Class<?> getType(final ELContext context, final Object base, final Object property) throws NullPointerException,
+        PropertyNotFoundException, ELException
     {
-        return invoke(context, base, property, new ResolverInvoker<Class<?>>()
+        if (base == null || property == null)
         {
-            @Override
-            Class<?> invoke(Object base, Object property)
-            {
-                if (needsCoersion(base))
-                {
-                    return propertyResolver.getType(base, coerceToInt(property));
-                }
+            return null;
+        }
 
-                return propertyResolver.getType(base, property);
+        try
+        {
+            context.setPropertyResolved(true);
+            Class<?> value;
+            if (needsCoersion(base))
+            {
+                value = propertyResolver.getType(base, coerceToInt(property));
+            } else
+            {
+                value = propertyResolver.getType(base, property);
             }
-        });
+
+            // see: https://issues.apache.org/jira/browse/MYFACES-1670
+            context.setPropertyResolved(
+                FacesContext.getCurrentInstance().getELContext().isPropertyResolved());
+
+            return value;
+        }
+        catch (javax.faces.el.PropertyNotFoundException e)
+        {
+            context.setPropertyResolved(false);
+            throw new PropertyNotFoundException(e.getMessage(), e);
+        }
+        catch (EvaluationException e)
+        {
+            context.setPropertyResolved(false);
+            throw new ELException(e.getMessage(), e);
+        }
+        catch (RuntimeException e)
+        {
+            context.setPropertyResolved(false);
+            throw e;
+        }
     }
 
     @Override
@@ -150,12 +238,14 @@
     {
 
         if (base == null)
+        {
             return null;
+        }
 
         return Object.class;
     }
 
-    private boolean needsCoersion(Object base)
+    private static boolean needsCoersion(Object base)
     {
         return (base instanceof List) || base.getClass().isArray();
     }
@@ -165,7 +255,7 @@
         if (expressionFactory == null)
         {
             ApplicationFactory appFactory = (ApplicationFactory) FactoryFinder
-                    .getFactory(FactoryFinder.APPLICATION_FACTORY);
+                .getFactory(FactoryFinder.APPLICATION_FACTORY);
             expressionFactory = appFactory.getApplication().getExpressionFactory();
         }
         return expressionFactory;
@@ -178,56 +268,9 @@
 
     private int coerceToInt(Object property)
     {
-        Integer coerced = (Integer) getExpressionFactory().coerceToType(property, Integer.class);
-        return coerced.intValue();
+        return (Integer) getExpressionFactory().coerceToType(property, Integer.class);
     }
 
-    private <T> T invoke(ELContext context, Object base, Object property, ResolverInvoker<T> invoker)
-            throws PropertyNotFoundException, ELException
-    {
-        if (base == null || property == null)
-        {
-            return invoker.getValueIfBaseAndPropertyIsNull();
-        }
-
-        try
-        {
-            context.setPropertyResolved(true);
-            T value = invoker.invoke(base, property);
-            
-            // see: https://issues.apache.org/jira/browse/MYFACES-1670
-            context.setPropertyResolved(
-                    FacesContext.getCurrentInstance().getELContext().isPropertyResolved());
-            
-            return value;
-        }
-        catch (javax.faces.el.PropertyNotFoundException e)
-        {
-            context.setPropertyResolved(false);
-            throw new PropertyNotFoundException(e.getMessage(), e);
-        }
-        catch (EvaluationException e)
-        {
-            context.setPropertyResolved(false);
-            throw new ELException(e.getMessage(), e);
-        }
-        catch (RuntimeException e)
-        {
-            context.setPropertyResolved(false);
-            throw e;
-        }
-    }
-
-    private abstract class ResolverInvoker<T>
-    {
-        abstract T invoke(Object base, Object property) throws PropertyNotFoundException, EvaluationException,
-                RuntimeException;
-
-        T getValueIfBaseAndPropertyIsNull()
-        {
-            return null;
-        }
-    }
 
     public PropertyResolver getPropertyResolver()
     {

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ValueBindingToValueExpression.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ValueBindingToValueExpression.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ValueBindingToValueExpression.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ValueBindingToValueExpression.java Sat Sep 13 16:10:53 2008
@@ -139,10 +139,9 @@
     @Override
     public int hashCode()
     {
-        final int PRIME = 31;
         int result = 1;
-        result = PRIME * result + (_transient ? 1231 : 1237);
-        result = PRIME * result + ((_valueBinding == null) ? 0 : _valueBinding.hashCode());
+        result = 31 * result + (_transient ? 1231 : 1237);
+        result = 31 * result + ((_valueBinding == null) ? 0 : _valueBinding.hashCode());
         return result;
     }
 
@@ -249,7 +248,7 @@
             throw new IllegalArgumentException("el context must not be null.");
         }
         FacesContext facesContext = (FacesContext) context.getContext(FacesContext.class);
-        if (context == null)
+        if (facesContext == null)
         {
             throw new IllegalStateException("faces context not available in el context.");
         }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ValueExpressionToValueBinding.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ValueExpressionToValueBinding.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ValueExpressionToValueBinding.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/ValueExpressionToValueBinding.java Sat Sep 13 16:10:53 2008
@@ -53,10 +53,9 @@
     @Override
     public int hashCode()
     {
-        final int PRIME = 31;
         int result = 1;
-        result = PRIME * result + ((_valueExpression == null) ? 0 : _valueExpression.hashCode());
-        result = PRIME * result + (isTransient ? 1231 : 1237);
+        result = 31 * result + ((_valueExpression == null) ? 0 : _valueExpression.hashCode());
+        result = 31 * result + (isTransient ? 1231 : 1237);
         return result;
     }
 

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/VariableResolverToELResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/VariableResolverToELResolver.java?rev=695059&r1=695058&r2=695059&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/VariableResolverToELResolver.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/convert/VariableResolverToELResolver.java Sat Sep 13 16:10:53 2008
@@ -40,7 +40,7 @@
  * @version $Revision$ $Date$
  */
 @SuppressWarnings("deprecation")
-public class VariableResolverToELResolver extends ELResolver
+public final class VariableResolverToELResolver extends ELResolver
 {
 
     // holds a flag to check if this instance is already called in current thread 
@@ -57,7 +57,7 @@
     /**
      * Creates a new instance of VariableResolverToELResolver
      */
-    public VariableResolverToELResolver(VariableResolver variableResolver)
+    public VariableResolverToELResolver(final VariableResolver variableResolver)
     {
         this.variableResolver = variableResolver;
     }
@@ -84,7 +84,7 @@
         if (!(property instanceof String))
             return null;
 
-        String strProperty = (String) property;
+        final String strProperty = (String) property;
 
         Object result = null;
         try
@@ -121,7 +121,7 @@
     }
 
     // get the FacesContext from the ELContext
-    private FacesContext facesContext(ELContext context)
+    private static FacesContext facesContext(ELContext context)
     {
         return (FacesContext) context.getContext(FacesContext.class);
     }