dev@javaserverfaces.java.net

[REVIEW] Return Converter and Validator test cases to running state; Findbugs corrections

From: Ryan Lubke <Ryan.Lubke_at_Sun.COM>
Date: Mon, 16 May 2005 13:48:57 -0400

<< ADD DESCRIPTION HERE >>


SECTION: Modified Files
----------------------------
jsf-tools
-----------------
M template-src/MessageFactory.java
 - coercion rules for String will result in null evaluation returning an
empty string.
   Updated MessageFactory getLabel() and BindingFacesMessage to take
this into account.
   These changes allow the ConverterTestCase to run as is.

jsf-ri
-----------------
M src/com/sun/faces/RIConstants.java
M src/com/sun/faces/application/ApplicationAssociate.java
M src/com/sun/faces/application/ApplicationImpl.java
M src/com/sun/faces/application/NavigationHandlerImpl.java
M src/com/sun/faces/application/ViewHandlerResponseWrapper.java
M src/com/sun/faces/config/ConfigureListener.java
M src/com/sun/faces/config/ManagedBeanFactory.java
M src/com/sun/faces/context/ExternalContextImpl.java
M src/com/sun/faces/el/ManagedBeanELResolver.java
M src/com/sun/faces/el/PropertyResolverChainWrapper.java
M src/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java
M src/com/sun/faces/lifecycle/InvokeApplicationPhase.java
M src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java
M src/com/sun/faces/lifecycle/ProcessValidationsPhase.java
M src/com/sun/faces/lifecycle/RenderResponsePhase.java
M src/com/sun/faces/lifecycle/RestoreViewPhase.java
M src/com/sun/faces/lifecycle/UpdateModelValuesPhase.java
M src/com/sun/faces/renderkit/ResponseStateManagerImpl.java
M src/com/sun/faces/renderkit/html_basic/ButtonRenderer.java
M src/com/sun/faces/renderkit/html_basic/CheckboxRenderer.java
M src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java
M src/com/sun/faces/renderkit/html_basic/FormRenderer.java
M src/com/sun/faces/renderkit/html_basic/GridRenderer.java
M src/com/sun/faces/renderkit/html_basic/GroupRenderer.java
M src/com/sun/faces/renderkit/html_basic/HtmlBasicInputRenderer.java
M src/com/sun/faces/renderkit/html_basic/HtmlBasicRenderer.java
M src/com/sun/faces/renderkit/html_basic/ImageRenderer.java
M src/com/sun/faces/renderkit/html_basic/LabelRenderer.java
M src/com/sun/faces/renderkit/html_basic/LinkRenderer.java
M src/com/sun/faces/renderkit/html_basic/MenuRenderer.java
M src/com/sun/faces/renderkit/html_basic/OutputLinkRenderer.java
M src/com/sun/faces/renderkit/html_basic/TableRenderer.java
M src/com/sun/faces/taglib/FacesValidator.java
M src/com/sun/faces/taglib/html_basic/ColumnTag.java
M src/com/sun/faces/taglib/jsf_core/ActionListenerTag.java
M src/com/sun/faces/taglib/jsf_core/ValueChangeListenerTag.java
M src/com/sun/faces/taglib/jsf_core/ViewTag.java
   - Change per findbugs (all pretty minor stuff)
      * removed unused variables and inner classes
      * made inner classes static nested classes
      * made serveral static Log fields private instead of protected
      * converted some string concatentation in loop over to StringBuffer
      * use of entrySet() vs keySet()

M systest/build-tests.xml
  - removed ValidatorTestCase and ConverterTestCase from exclude list

M systest/src/com/sun/faces/jsptest/ValidatorTestCase.java
  - updated the ID that is expected.

SECTION: Diffs
----------------------------
Index: template-src/MessageFactory.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-tools/template-src/MessageFactory.java,v
retrieving revision 1.8
diff -u -r1.8 MessageFactory.java
--- template-src/MessageFactory.java 24 Feb 2005 15:20:28 -0000 1.8
+++ template-src/MessageFactory.java 16 May 2005 17:39:38 -0000
@@ -19,6 +19,7 @@
 import java.util.Properties;
 import java.util.ResourceBundle;
 import java.util.MissingResourceException;
+import javax.el.ValueExpression;
 import javax.faces.FacesException;
 import javax.faces.FactoryFinder;
 import javax.faces.application.Application;
@@ -211,7 +212,7 @@
     @protection@ static Object getLabel(FacesContext context,
         UIComponent component) {
         Object o = component.getAttributes().get("label");
- if (o == null) {
+ if (o == null || (o instanceof String && ((String) o).length()
== 0)) {
             o = component.getValueBinding("label");
         }
         // Use the "clientId" if there was no label specified.
@@ -290,6 +291,12 @@
                             context = FacesContext.getCurrentInstance();
                         }
                         o = ((ValueBinding) o).getValue(context);
+ }
+ if (o instanceof ValueExpression) {
+ if (context == null) {
+ context = FacesContext.getCurrentInstance();
+ }
+ o = ((ValueExpression)
o).getValue(context.getELContext());
                     }
                     // to avoid 'null' appearing in message
                     if (o == null) {


Index: src/com/sun/faces/RIConstants.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/RIConstants.java,v
retrieving revision 1.72
diff -u -r1.72 RIConstants.java
--- src/com/sun/faces/RIConstants.java 2 May 2005 19:27:09 -0000 1.72
+++ src/com/sun/faces/RIConstants.java 16 May 2005 17:41:10 -0000
@@ -114,7 +114,7 @@
     public static final String TLV_RESOURCE_LOCATION =
         FACES_PREFIX + "resources.Resources";
 
- public static final Object NO_VALUE = new String();
+ public static final Object NO_VALUE = "";
 
     public static boolean HTML_TLV_ACTIVE = true;
     public static boolean CORE_TLV_ACTIVE = true;
Index: src/com/sun/faces/application/ApplicationAssociate.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ApplicationAssociate.java,v
retrieving revision 1.10
diff -u -r1.10 ApplicationAssociate.java
--- src/com/sun/faces/application/ApplicationAssociate.java 5 May
2005 20:51:19 -0000 1.10
+++ src/com/sun/faces/application/ApplicationAssociate.java 16 May
2005 17:41:11 -0000
@@ -9,24 +9,6 @@
 
 package com.sun.faces.application;
 
-import java.util.logging.Logger;
-import java.util.logging.Level;
-
-import com.sun.faces.RIConstants;
-import com.sun.faces.config.ConfigureListener;
-import com.sun.faces.config.ManagedBeanFactory;
-import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.faces.FacesException;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-
-import javax.faces.el.VariableResolver;
-import javax.faces.el.PropertyResolver;
-import javax.el.ExpressionFactory;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
@@ -34,6 +16,20 @@
 import java.util.List;
 import java.util.Map;
 import java.util.TreeSet;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import javax.el.ExpressionFactory;
+import javax.faces.FacesException;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.el.PropertyResolver;
+import javax.faces.el.VariableResolver;
+
+import com.sun.faces.RIConstants;
+import com.sun.faces.config.ConfigureListener;
+import com.sun.faces.config.ManagedBeanFactory;
+import com.sun.faces.util.Util;
 
 /**
  * <p>Break out the things that are associated with the Application, but
@@ -410,19 +406,13 @@
      * based on their <code>fromViewId</code> properties in descending
order -
      * largest string to smallest string.
      */
- class SortIt implements Comparator {
+ static class SortIt implements Comparator {
 
         public int compare(Object o1, Object o2) {
             String fromViewId1 = (String) o1;
             String fromViewId2 = (String) o2;
             return -(fromViewId1.compareTo(fromViewId2));
         }
- }
-
- class CaseStruct {
-
- String viewId;
- ConfigNavigationCase navCase;
     }
 
 }
Index: src/com/sun/faces/application/ApplicationImpl.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ApplicationImpl.java,v
retrieving revision 1.60
diff -u -r1.60 ApplicationImpl.java
--- src/com/sun/faces/application/ApplicationImpl.java 5 May 2005
20:51:19 -0000 1.60
+++ src/com/sun/faces/application/ApplicationImpl.java 16 May 2005
17:41:12 -0000
@@ -101,7 +101,6 @@
     private String messageBundle = null;
 
     private ArrayList elContextListeners = null;
- private ExpressionFactory expressionFactory = null;
     private ArrayList elResolvers = null;
     private CompositeELResolver compositeELResolver = null;
 
Index: src/com/sun/faces/application/NavigationHandlerImpl.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/NavigationHandlerImpl.java,v
retrieving revision 1.36
diff -u -r1.36 NavigationHandlerImpl.java
--- src/com/sun/faces/application/NavigationHandlerImpl.java 5 Apr
2005 20:25:13 -0000 1.36
+++ src/com/sun/faces/application/NavigationHandlerImpl.java 16 May
2005 17:41:13 -0000
@@ -9,8 +9,12 @@
 
 package com.sun.faces.application;
 
-import com.sun.faces.util.Util;
-import com.sun.faces.config.ConfigureListener;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeSet;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.faces.FacesException;
 import javax.faces.FactoryFinder;
@@ -21,12 +25,8 @@
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
 
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeSet;
-import java.util.logging.Logger;
-import java.util.logging.Level;
+import com.sun.faces.config.ConfigureListener;
+import com.sun.faces.util.Util;
 
 /**
  * <p><strong>NavigationHandlerImpl</strong> is the class that implements
@@ -407,7 +407,7 @@
     }
 
 
- class CaseStruct {
+ static class CaseStruct {
 
         String viewId;
         ConfigNavigationCase navCase;
Index: src/com/sun/faces/application/ViewHandlerResponseWrapper.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/application/ViewHandlerResponseWrapper.java,v
retrieving revision 1.1
diff -u -r1.1 ViewHandlerResponseWrapper.java
--- src/com/sun/faces/application/ViewHandlerResponseWrapper.java 21
Apr 2005 18:55:35 -0000 1.1
+++ src/com/sun/faces/application/ViewHandlerResponseWrapper.java 16
May 2005 17:41:13 -0000
@@ -13,20 +13,19 @@
 
 package com.sun.faces.application;
 
-import javax.servlet.http.HttpServletResponseWrapper;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.ServletResponse;
-import javax.servlet.ServletOutputStream;
-
-import java.io.PrintWriter;
-import java.io.IOException;
-import java.io.OutputStream;
 import java.io.ByteArrayOutputStream;
-import java.io.UnsupportedEncodingException;
 import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.UnsupportedEncodingException;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
 
 /**
- * <p>This class is used by {_at_link ViewHandler#createView} to obtain the
+ * <p>This class is used by {_at_link
javax.faces.application.ViewHandler#createView} to obtain the
  * text that exists after the &lt;f:view&gt; tag.</p>
  */
 
@@ -146,7 +145,7 @@
     // Inner clases
     //
 
- class ByteArrayServletOutputStream extends ServletOutputStream {
+ static class ByteArrayServletOutputStream extends ServletOutputStream {
     private ByteArrayOutputStream baos = null;
 
     public ByteArrayServletOutputStream() {
Index: src/com/sun/faces/config/ConfigureListener.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/config/ConfigureListener.java,v
retrieving revision 1.32
diff -u -r1.32 ConfigureListener.java
--- src/com/sun/faces/config/ConfigureListener.java 5 May 2005
20:51:20 -0000 1.32
+++ src/com/sun/faces/config/ConfigureListener.java 16 May 2005
17:41:15 -0000
@@ -101,7 +101,7 @@
     /**
      * <p><code>ServletContext</code> attribute key.</p>
      */
- protected static String FACES_CONFIG_BEAN_KEY =
+ protected static final String FACES_CONFIG_BEAN_KEY =
         RIConstants.FACES_PREFIX + "FACES_CONFIG_BEAN";
 
     /**
@@ -1407,7 +1407,7 @@
     }
 
 
- public class ServletContextAdapter extends ExternalContext {
+ public static class ServletContextAdapter extends ExternalContext {
        
         private ServletContext servletContext = null;
         private ApplicationMap applicationMap = null;
@@ -1580,7 +1580,7 @@
 
     }
    
- class ApplicationMap extends java.util.AbstractMap {
+ static class ApplicationMap extends java.util.AbstractMap {
 
         private ServletContext servletContext = null;
 
@@ -1732,8 +1732,8 @@
          */
         private class WebXmlHandler extends DefaultHandler {
 
- private final String SERVLET_CLASS = "servlet-class";
- private final String FACES_SERVLET =
+ private static final String SERVLET_CLASS = "servlet-class";
+ private static final String FACES_SERVLET =
                 "javax.faces.webapp.FacesServlet";
 
             private boolean servletClassFound;
Index: src/com/sun/faces/config/ManagedBeanFactory.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/config/ManagedBeanFactory.java,v
retrieving revision 1.28
diff -u -r1.28 ManagedBeanFactory.java
--- src/com/sun/faces/config/ManagedBeanFactory.java 5 May 2005
20:51:20 -0000 1.28
+++ src/com/sun/faces/config/ManagedBeanFactory.java 16 May 2005
17:41:17 -0000
@@ -9,33 +9,34 @@
 
 package com.sun.faces.config;
 
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.el.EvaluationException;
+import javax.faces.el.PropertyNotFoundException;
+import javax.faces.el.ReferenceSyntaxException;
+
 import com.sun.faces.RIConstants;
+import com.sun.faces.config.beans.DescriptionBean;
 import com.sun.faces.config.beans.ListEntriesBean;
 import com.sun.faces.config.beans.ManagedBeanBean;
 import com.sun.faces.config.beans.ManagedPropertyBean;
 import com.sun.faces.config.beans.MapEntriesBean;
 import com.sun.faces.config.beans.MapEntryBean;
-import com.sun.faces.config.beans.DescriptionBean;
 import com.sun.faces.util.Util;
+
 import org.apache.commons.beanutils.PropertyUtils;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import javax.faces.FacesException;
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.el.EvaluationException;
-import javax.faces.el.PropertyNotFoundException;
-import javax.faces.el.ReferenceSyntaxException;
-import javax.el.ValueExpression;
-
-import java.lang.reflect.Array;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 /**
  * <p>This class creates a managed bean instance. It has a contract with
  * the ManagedBeanBean class which is populated from the config file.
@@ -61,6 +62,10 @@
     //
     // Protected Constants
     //
+ /**
+ * Managed bean type is unknown
+ */
+ private static final byte TYPE_IS_UNKNOWN = -1;
    
     /**
      * This managed-bean or managed-property is a List
@@ -187,7 +192,7 @@
         Object
             bean = null;
         int
- beanType = -1;
+ beanType = TYPE_IS_UNKNOWN;
 
         // before instantiating the bean, make sure there is no cyclic
         // references.
@@ -278,18 +283,19 @@
      */
 
     protected int getBeanType(Object bean) {
- int result = -1;
- ListEntriesBean listEntries = null;
- MapEntriesBean mapEntries = null;
+ int result = TYPE_IS_UNKNOWN;
+ ListEntriesBean listEntries = managedBean.getListEntries();
+ MapEntriesBean mapEntries = managedBean.getMapEntries();
+ ManagedPropertyBean[] managedProperties =
+ managedBean.getManagedProperties();
 
         // is it a List?
- if (null != (listEntries = managedBean.getListEntries())) {
+ if (listEntries != null) {
             // managed-bean instances that are Lists, must not have
             // properties or map-entries. It is a configuration error
             // if they do.
- if (null != managedBean.getMapEntries() ||
- (null != managedBean.getManagedProperties() &&
- (managedBean.getManagedProperties().length > 0))) {
+ if (mapEntries != null ||
+ (managedProperties.length > 0)) {
                 Object[] obj = new Object[1];
                 obj[0] = managedBean.getManagedBeanClass();
                 throw new FacesException(
@@ -300,15 +306,13 @@
         }
 
         // is it a Map?
- if (null != (mapEntries = managedBean.getMapEntries())) {
- assert (-1 == result);
+ if (mapEntries != null) {
+ assert (TYPE_IS_UNKNOWN == result);
 
             // managed-bean instances that are Maps, must not have
             // properties or list-entries. It is a configuration error
             // if they do.
- if (null != managedBean.getListEntries() ||
- (null != managedBean.getManagedProperties() &&
- (managedBean.getManagedProperties().length > 0))) {
+ if (managedBean.getManagedProperties().length > 0) {
                 Object[] obj = new Object[1];
                 obj[0] = managedBean.getManagedBeanClass();
                 throw new FacesException(
@@ -319,7 +323,7 @@
         }
 
         if (TYPE_IS_LIST != result && TYPE_IS_MAP != result) {
- assert (-1 == result);
+ assert (TYPE_IS_UNKNOWN == result);
 
             // if it's not a List or a Map, it must be a Bean
             if (bean instanceof UIComponent) {
@@ -329,7 +333,7 @@
             }
         }
 
- assert (-1 != result);
+ assert (TYPE_IS_UNKNOWN != result);
         return result;
     }
 
@@ -341,16 +345,16 @@
      */
 
     protected int getPropertyType(ManagedPropertyBean bean) {
- int result = -1;
- ListEntriesBean listEntries = null;
- MapEntriesBean mapEntries = null;
+ int result = TYPE_IS_UNKNOWN;
+ ListEntriesBean listEntries = bean.getListEntries();
+ MapEntriesBean mapEntries = bean.getMapEntries();
 
         // is it a List?
- if (null != (listEntries = bean.getListEntries())) {
+ if (listEntries != null) {
             // managed-property instances that have list-entries must
             // not have value or map-entries. It is a configuration
             // error if they do.
- if (null != bean.getMapEntries() ||
+ if (mapEntries != null ||
                 null != bean.getValue() || bean.isNullValue()) {
                 Object[] obj = new Object[1];
                 obj[0] = bean.getPropertyName();
@@ -362,14 +366,13 @@
         }
 
         // is it a Map?
- if (null != (mapEntries = bean.getMapEntries())) {
- assert (-1 == result);
+ if (mapEntries != null) {
+ assert (TYPE_IS_UNKNOWN == result);
 
             // managed-property instances that have map-entries, must
             // not have value or list-entries. It is a configuration
             // error if they do.
- if (null != bean.getListEntries() ||
- null != bean.getValue() || bean.isNullValue()) {
+ if (null != bean.getValue() || bean.isNullValue()) {
                 Object[] obj = new Object[1];
                 obj[0] = bean.getPropertyName();
                 throw new FacesException(
@@ -380,7 +383,7 @@
         }
 
         if (TYPE_IS_LIST != result && TYPE_IS_MAP != result) {
- assert (-1 == result);
+ assert (TYPE_IS_UNKNOWN == result);
 
             if (null != bean.getValue() || bean.isNullValue()) {
                 result = TYPE_IS_SIMPLE;
@@ -390,7 +393,7 @@
         // if the managed-property doesn't have list-entries,
         // map-entries, value, or null-value contents, this is a
         // configuration error. The DTD doesn't allow this anyway.
- if (-1 == result && !bean.isNullValue()) {
+ if (TYPE_IS_UNKNOWN == result && !bean.isNullValue()) {
             Object[] obj = new Object[1];
             obj[0] = bean.getPropertyName();
             throw new FacesException(
Index: src/com/sun/faces/context/ExternalContextImpl.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/context/ExternalContextImpl.java,v
retrieving revision 1.29
diff -u -r1.29 ExternalContextImpl.java
--- src/com/sun/faces/context/ExternalContextImpl.java 2 May 2005
12:49:55 -0000 1.29
+++ src/com/sun/faces/context/ExternalContextImpl.java 16 May 2005
17:41:18 -0000
@@ -9,8 +9,19 @@
 
 package com.sun.faces.context;
 
-import com.sun.faces.RIConstants;
-import com.sun.faces.util.Util;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.AbstractMap;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
 
 import javax.faces.FacesException;
 import javax.faces.context.ExternalContext;
@@ -27,19 +38,8 @@
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.AbstractMap;
-import java.util.Enumeration;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.Map;
-import java.util.Set;
-import java.util.Collections;
-import java.util.HashMap;
+import com.sun.faces.RIConstants;
+import com.sun.faces.util.Util;
 
 /**
  * <p>This implementation of {_at_link ExternalContext} is specific to the
@@ -391,7 +391,7 @@
     }
 
 
- private class LocalesIterator implements Iterator {
+ private static class LocalesIterator implements Iterator {
 
         public LocalesIterator(Enumeration locales) {
             this.locales = locales;
Index: src/com/sun/faces/el/ManagedBeanELResolver.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/ManagedBeanELResolver.java,v
retrieving revision 1.1
diff -u -r1.1 ManagedBeanELResolver.java
--- src/com/sun/faces/el/ManagedBeanELResolver.java 5 May 2005
20:51:23 -0000 1.1
+++ src/com/sun/faces/el/ManagedBeanELResolver.java 16 May 2005
17:41:19 -0000
@@ -8,26 +8,22 @@
 
 package com.sun.faces.el;
 
+import java.beans.BeanInfo;
+import java.beans.FeatureDescriptor;
 import java.util.ArrayList;
 import java.util.Iterator;
-import java.util.HashMap;
-import java.beans.FeatureDescriptor;
-import java.beans.BeanInfo;
-import java.beans.PropertyDescriptor;
-import java.beans.Introspector;
+import java.util.Map;
 
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-
-import javax.el.ELException;
-import javax.el.PropertyNotWritableException;
-import javax.el.PropertyNotFoundException;
 import javax.el.ELContext;
+import javax.el.ELException;
 import javax.el.ELResolver;
+import javax.el.PropertyNotFoundException;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
 
 import com.sun.faces.application.ApplicationAssociate;
-import com.sun.faces.util.Util;
 import com.sun.faces.config.ManagedBeanFactory;
+import com.sun.faces.util.Util;
 
 public class ManagedBeanELResolver extends ELResolver {
 
@@ -157,16 +153,16 @@
             (FacesContext) context.getContext(FacesContext.class);
         ApplicationAssociate associate =
             
ApplicationAssociate.getInstance(facesContext.getExternalContext());
- HashMap mbMap = (HashMap) associate.getManagedBeanFactoriesMap();
+ Map mbMap = associate.getManagedBeanFactoriesMap();
         if (mbMap == null) {
             return list.iterator();
         }
         // iterate over the list of managed beans
- Iterator it = mbMap.keySet().iterator();
- while (it.hasNext()) {
- String managedBeanName = (String) it.next();
+ for (Iterator i = mbMap.entrySet().iterator(); i.hasNext(); ) {
+ Map.Entry entry = (Map.Entry) i.next();
+ String managedBeanName = (String) entry.getKey();
             ManagedBeanFactory managedBean = (ManagedBeanFactory)
- mbMap.get(managedBeanName);
+ entry.getValue();
             if ( managedBean != null) {
                 String desc =
                 managedBean.getBeanDescription((
Index: src/com/sun/faces/el/PropertyResolverChainWrapper.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/el/PropertyResolverChainWrapper.java,v
retrieving revision 1.1
diff -u -r1.1 PropertyResolverChainWrapper.java
--- src/com/sun/faces/el/PropertyResolverChainWrapper.java 5 May 2005
20:51:23 -0000 1.1
+++ src/com/sun/faces/el/PropertyResolverChainWrapper.java 16 May
2005 17:41:19 -0000
@@ -8,22 +8,14 @@
 
 package com.sun.faces.el;
 
-import java.util.List;
-import java.util.ArrayList;
 import java.util.Iterator;
-import java.beans.FeatureDescriptor;
-
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.el.PropertyResolver;
-import javax.faces.el.EvaluationException;
+import java.util.List;
 
-import javax.el.ELException;
-import javax.el.PropertyNotWritableException;
 import javax.el.ELContext;
+import javax.el.ELException;
 import javax.el.ELResolver;
-
-import com.sun.faces.el.ELConstants;
+import javax.faces.el.EvaluationException;
+import javax.faces.el.PropertyResolver;
 
 public class PropertyResolverChainWrapper extends ELResolver {
 
@@ -40,9 +32,7 @@
         }
         context.setPropertyResolved(true);
         Object result = null;
-
- FacesContext facesContext =
- (FacesContext) context.getContext(FacesContext.class);
+
         if (base instanceof List || base.getClass().isArray()) {
             int index =
                 ELSupport.coerceToNumber(property,
Integer.class).intValue();
@@ -78,8 +68,6 @@
         context.setPropertyResolved(true);
         Class result = null;
 
- FacesContext facesContext = (FacesContext)
- context.getContext(FacesContext.class);
         if (base instanceof List || base.getClass().isArray()) {
             int index =
                 ELSupport.coerceToNumber(property,
Integer.class).intValue();
@@ -112,9 +100,7 @@
     }
 
         context.setPropertyResolved(true);
-
- FacesContext facesContext =
- (FacesContext) context.getContext(FacesContext.class);
+
         if (base instanceof List || base.getClass().isArray()) {
             int index =
                 ELSupport.coerceToNumber(property,
Integer.class).intValue();
@@ -141,9 +127,7 @@
         }
         context.setPropertyResolved(true);
         boolean result = false;
-
- FacesContext facesContext = (FacesContext)
- context.getContext(FacesContext.class);
+
         if (base instanceof List || base.getClass().isArray()) {
             int index =
                 ELSupport.coerceToNumber(property,
Integer.class).intValue();
Index: src/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java,v
retrieving revision 1.18
diff -u -r1.18 ApplyRequestValuesPhase.java
--- src/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java 12 Oct
2004 14:39:50 -0000 1.18
+++ src/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java 16 May
2005 17:41:19 -0000
@@ -9,15 +9,14 @@
 
 package com.sun.faces.lifecycle;
 
-import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import javax.faces.FacesException;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.event.PhaseId;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * ApplyRequestValuesPhase executes <code>processDecodes</code> on each
  * component in the tree so that it may update it's current value from the
@@ -38,7 +37,8 @@
     // Instance Variables
     //
     // Log instance for this class
- protected static Log log =
LogFactory.getLog(ApplyRequestValuesPhase.class);
+ private static final Log log =
+ LogFactory.getLog(ApplyRequestValuesPhase.class);
 
     // Relationship Instance Variables
 
Index: src/com/sun/faces/lifecycle/InvokeApplicationPhase.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/InvokeApplicationPhase.java,v
retrieving revision 1.16
diff -u -r1.16 InvokeApplicationPhase.java
--- src/com/sun/faces/lifecycle/InvokeApplicationPhase.java 12 Oct
2004 14:39:50 -0000 1.16
+++ src/com/sun/faces/lifecycle/InvokeApplicationPhase.java 16 May
2005 17:41:19 -0000
@@ -11,15 +11,14 @@
 
 package com.sun.faces.lifecycle;
 
-import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import javax.faces.FacesException;
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
 import javax.faces.event.PhaseId;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * <B>Lifetime And Scope</B> <P> Same lifetime and scope as
  * DefaultLifecycleImpl.
@@ -38,7 +37,8 @@
 //
 
     // Log instance for this class
- protected static Log log =
LogFactory.getLog(InvokeApplicationPhase.class);
+ private static final Log log =
+ LogFactory.getLog(InvokeApplicationPhase.class);
 
 //
 // Instance Variables
Index: src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java,v
retrieving revision 1.22
diff -u -r1.22 LifecycleFactoryImpl.java
--- src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java 12 Oct 2004
14:39:50 -0000 1.22
+++ src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java 16 May 2005
17:41:20 -0000
@@ -11,17 +11,18 @@
 
 package com.sun.faces.lifecycle;
 
-import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.HashMap;
+import java.util.Iterator;
 
 import javax.faces.FacesException;
 import javax.faces.event.PhaseId;
 import javax.faces.lifecycle.Lifecycle;
 import javax.faces.lifecycle.LifecycleFactory;
 
-import java.util.HashMap;
-import java.util.Iterator;
+import com.sun.faces.util.Util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * <B>LifecycleFactoryImpl</B> is the stock implementation of Lifecycle
@@ -40,7 +41,8 @@
     static final int LAST_PHASE = PhaseId.RENDER_RESPONSE.getOrdinal();
 
 // Log instance for this class
- protected static Log log =
LogFactory.getLog(LifecycleFactoryImpl.class);
+ private static final Log log =
+ LogFactory.getLog(LifecycleFactoryImpl.class);
 
 //
 // Class Variables
Index: src/com/sun/faces/lifecycle/ProcessValidationsPhase.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/ProcessValidationsPhase.java,v
retrieving revision 1.22
diff -u -r1.22 ProcessValidationsPhase.java
--- src/com/sun/faces/lifecycle/ProcessValidationsPhase.java 12 Oct
2004 14:39:51 -0000 1.22
+++ src/com/sun/faces/lifecycle/ProcessValidationsPhase.java 16 May
2005 17:41:20 -0000
@@ -9,15 +9,14 @@
 
 package com.sun.faces.lifecycle;
 
-import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import javax.faces.FacesException;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.event.PhaseId;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 /**
  * ProcessValidationsPhase executes <code>processValidators</code> on each
  * component in the tree.
@@ -29,7 +28,8 @@
 //
    
 // Log instance for this class
- protected static Log log =
LogFactory.getLog(ProcessValidationsPhase.class);
+ private static final Log log =
+ LogFactory.getLog(ProcessValidationsPhase.class);
 
 //
 // Class Variables
Index: src/com/sun/faces/lifecycle/RenderResponsePhase.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/RenderResponsePhase.java,v
retrieving revision 1.14
diff -u -r1.14 RenderResponsePhase.java
--- src/com/sun/faces/lifecycle/RenderResponsePhase.java 26 Feb 2004
20:32:48 -0000 1.14
+++ src/com/sun/faces/lifecycle/RenderResponsePhase.java 16 May 2005
17:41:20 -0000
@@ -12,14 +12,14 @@
 package com.sun.faces.lifecycle;
 
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.IOException;
 
 import javax.faces.FacesException;
 import javax.faces.context.FacesContext;
 import javax.faces.event.PhaseId;
 
-import java.io.IOException;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 
 /**
@@ -35,7 +35,7 @@
 // Protected Constants
 //
 // Log instance for this class
- protected static Log log =
LogFactory.getLog(RenderResponsePhase.class);
+ private static final Log log =
LogFactory.getLog(RenderResponsePhase.class);
 
 //
 // Class Variables
Index: src/com/sun/faces/lifecycle/RestoreViewPhase.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/RestoreViewPhase.java,v
retrieving revision 1.22
diff -u -r1.22 RestoreViewPhase.java
--- src/com/sun/faces/lifecycle/RestoreViewPhase.java 5 May 2005
20:51:24 -0000 1.22
+++ src/com/sun/faces/lifecycle/RestoreViewPhase.java 16 May 2005
17:41:20 -0000
@@ -11,25 +11,23 @@
 
 package com.sun.faces.lifecycle;
 
-import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.Iterator;
+import java.util.Locale;
+import java.util.Map;
 
+import javax.el.ValueExpression;
 import javax.faces.FacesException;
-import javax.faces.FactoryFinder;
-import javax.faces.application.ApplicationFactory;
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIViewRoot;
 import javax.faces.context.FacesContext;
-import javax.el.ValueExpression;
-import javax.faces.event.ActionListener;
 import javax.faces.event.PhaseId;
 import javax.faces.render.ResponseStateManager;
 import javax.servlet.http.HttpServletRequest;
 
-import java.util.Iterator;
-import java.util.Locale;
-import java.util.Map;
+import com.sun.faces.util.Util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 
 /**
@@ -45,7 +43,7 @@
     // Protected Constants
     //
     // Log instance for this class
- protected static Log log = LogFactory.getLog(RestoreViewPhase.class);
+ private static final Log log =
LogFactory.getLog(RestoreViewPhase.class);
 
     //
     // Class Variables
@@ -53,9 +51,7 @@
 
     //
     // Instance Variables
- //
-
- private ActionListener actionListener = null;
+ //
 
     // Attribute Instance Variables
 
@@ -64,15 +60,6 @@
     //
     // Constructors and Genericializers
     //
-
- public RestoreViewPhase() {
-
- ApplicationFactory aFactory = (ApplicationFactory)
- FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY);
- if (aFactory != null) {
- actionListener = aFactory.getApplication().getActionListener();
- }
- }
 
     //
     // Class methods
Index: src/com/sun/faces/lifecycle/UpdateModelValuesPhase.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/UpdateModelValuesPhase.java,v
retrieving revision 1.37
diff -u -r1.37 UpdateModelValuesPhase.java
--- src/com/sun/faces/lifecycle/UpdateModelValuesPhase.java 12 Oct
2004 14:39:51 -0000 1.37
+++ src/com/sun/faces/lifecycle/UpdateModelValuesPhase.java 16 May
2005 17:41:20 -0000
@@ -38,7 +38,8 @@
 // Instance Variables
 //
 // Log instance for this class
- protected static Log log =
LogFactory.getLog(UpdateModelValuesPhase.class);
+ private static final Log log =
+ LogFactory.getLog(UpdateModelValuesPhase.class);
 
 // Attribute Instance Variables
 
Index: src/com/sun/faces/renderkit/ResponseStateManagerImpl.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/ResponseStateManagerImpl.java,v
retrieving revision 1.19
diff -u -r1.19 ResponseStateManagerImpl.java
--- src/com/sun/faces/renderkit/ResponseStateManagerImpl.java 2 May
2005 19:27:09 -0000 1.19
+++ src/com/sun/faces/renderkit/ResponseStateManagerImpl.java 16 May
2005 17:41:21 -0000
@@ -10,28 +10,27 @@
 
 package com.sun.faces.renderkit;
 
-import com.sun.faces.RIConstants;
-import com.sun.faces.util.Base64;
-import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.faces.application.StateManager.SerializedView;
-import javax.faces.application.StateManager;
-import javax.faces.context.FacesContext;
-import javax.faces.render.RenderKitFactory;
-import javax.faces.render.ResponseStateManager;
-import javax.faces.context.ResponseWriter;
-
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
-
+import java.util.Map;
 import java.util.zip.GZIPInputStream;
 import java.util.zip.GZIPOutputStream;
-import java.util.Map;
+
+import javax.faces.application.StateManager;
+import javax.faces.application.StateManager.SerializedView;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.RenderKitFactory;
+import javax.faces.render.ResponseStateManager;
+
+import com.sun.faces.util.Base64;
+import com.sun.faces.util.Util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 
 /**
@@ -43,7 +42,7 @@
     //
     // Protected Constants
     //
- protected static Log log =
+ private static final Log log =
         LogFactory.getLog(ResponseStateManagerImpl.class);
     private static final String FACES_VIEW_STATE =
         "com.sun.faces.FACES_VIEW_STATE";
Index: src/com/sun/faces/renderkit/html_basic/ButtonRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/ButtonRenderer.java,v
retrieving revision 1.85
diff -u -r1.85 ButtonRenderer.java
--- src/com/sun/faces/renderkit/html_basic/ButtonRenderer.java 2 May
2005 12:49:57 -0000 1.85
+++ src/com/sun/faces/renderkit/html_basic/ButtonRenderer.java 16 May
2005 17:41:21 -0000
@@ -11,19 +11,20 @@
 
 package com.sun.faces.renderkit.html_basic;
 
-import com.sun.faces.util.Util;
+import java.io.IOException;
+import java.util.Map;
 
+import javax.faces.FacesException;
 import javax.faces.component.NamingContainer;
 import javax.faces.component.UICommand;
 import javax.faces.component.UIComponent;
+import javax.faces.component.UIForm;
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 import javax.faces.event.ActionEvent;
 
-import java.io.IOException;
-import java.util.Map;
-import javax.faces.FacesException;
-import javax.faces.component.UIForm;
+import com.sun.faces.util.Util;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
@@ -38,7 +39,7 @@
     // Protected Constants
     //
     // Log instance for this class
- protected static Log log = LogFactory.getLog(ButtonRenderer.class);
+ private static final Log log = LogFactory.getLog(ButtonRenderer.class);
 
     //
     // Class Variables
Index: src/com/sun/faces/renderkit/html_basic/CheckboxRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/CheckboxRenderer.java,v
retrieving revision 1.71
diff -u -r1.71 CheckboxRenderer.java
--- src/com/sun/faces/renderkit/html_basic/CheckboxRenderer.java 21
Apr 2005 18:55:35 -0000 1.71
+++ src/com/sun/faces/renderkit/html_basic/CheckboxRenderer.java 16
May 2005 17:41:21 -0000
@@ -12,18 +12,18 @@
 
 package com.sun.faces.renderkit.html_basic;
 
-import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.IOException;
+import java.util.Map;
 
 import javax.faces.component.UIComponent;
-import javax.faces.component.UIInput;
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 import javax.faces.convert.ConverterException;
 
-import java.io.IOException;
-import java.util.Map;
+import com.sun.faces.util.Util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * <B>CheckboxRenderer</B> is a class that renders the current value of
@@ -36,7 +36,7 @@
     // Protected Constants
     //
     // Log instance for this class
- protected static Log log = LogFactory.getLog(CheckboxRenderer.class);
+ private static final Log log =
LogFactory.getLog(CheckboxRenderer.class);
 
     //
     // Class Variables
@@ -98,7 +98,7 @@
         String clientId = component.getClientId(context);
         assert (clientId != null);
         // Convert the new value
- UIInput uiInput = (UIInput) component;
+
         Map requestParameterMap = context.getExternalContext()
             .getRequestParameterMap();
         String newValue = (String) requestParameterMap.get(clientId);
@@ -156,7 +156,7 @@
         writer.writeAttribute("name", component.getClientId(context),
                               "clientId");
 
- if (currentValue != null && currentValue.equals("true")) {
+ if ("true".equals(currentValue)) {
             writer.writeAttribute("checked", Boolean.TRUE, "value");
         }
         if (null != (styleClass = (String)
Index: src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java,v
retrieving revision 1.30
diff -u -r1.30 CommandLinkRenderer.java
--- src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java
13 May 2005 01:03:29 -0000 1.30
+++ src/com/sun/faces/renderkit/html_basic/CommandLinkRenderer.java
16 May 2005 17:41:22 -0000
@@ -11,25 +11,24 @@
 
 package com.sun.faces.renderkit.html_basic;
 
-import com.sun.faces.util.Util;
-import com.sun.faces.RIConstants;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.Map;
 
+import javax.faces.component.NamingContainer;
 import javax.faces.component.UICommand;
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIForm;
 import javax.faces.component.UIViewRoot;
-import javax.faces.component.NamingContainer;
-import javax.faces.component.html.HtmlCommandLink;
 import javax.faces.context.FacesContext;
-import javax.faces.context.ExternalContext;
 import javax.faces.context.ResponseWriter;
 import javax.faces.event.ActionEvent;
 
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.Map;
+import com.sun.faces.RIConstants;
+import com.sun.faces.util.Util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * <B>CommandLinkRenderer</B> is a class that renders the current value of
@@ -42,7 +41,7 @@
     // Protected Constants
     //
     // Log instance for this class
- protected static Log log =
LogFactory.getLog(CommandLinkRenderer.class);
+ private static final Log log =
LogFactory.getLog(CommandLinkRenderer.class);
     
     // Separator character
 
Index: src/com/sun/faces/renderkit/html_basic/FormRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/FormRenderer.java,v
retrieving revision 1.86
diff -u -r1.86 FormRenderer.java
--- src/com/sun/faces/renderkit/html_basic/FormRenderer.java 2 May
2005 12:49:57 -0000 1.86
+++ src/com/sun/faces/renderkit/html_basic/FormRenderer.java 16 May
2005 17:41:22 -0000
@@ -11,21 +11,18 @@
 
 package com.sun.faces.renderkit.html_basic;
 
-import com.sun.faces.RIConstants;
-import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.IOException;
+import java.util.Map;
 
-import javax.faces.component.NamingContainer;
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIForm;
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
+import com.sun.faces.util.Util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * <B>FormRenderer</B> is a class that renders a <code>UIForm<code> as
a Form.
@@ -37,7 +34,7 @@
     // Protected Constants
     //
     // Log instance for this class
- protected static Log log = LogFactory.getLog(FormRenderer.class);
+ private static final Log log = LogFactory.getLog(FormRenderer.class);
     //
     // Class Variables
     //
Index: src/com/sun/faces/renderkit/html_basic/GridRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/GridRenderer.java,v
retrieving revision 1.34
diff -u -r1.34 GridRenderer.java
--- src/com/sun/faces/renderkit/html_basic/GridRenderer.java 16 Dec
2004 17:56:37 -0000 1.34
+++ src/com/sun/faces/renderkit/html_basic/GridRenderer.java 16 May
2005 17:41:23 -0000
@@ -10,17 +10,18 @@
 package com.sun.faces.renderkit.html_basic;
 
 
-import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Iterator;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Iterator;
+import com.sun.faces.util.Util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * <B>GridRenderer</B> is a class that renders <code>UIPanel</code>
component
@@ -33,7 +34,7 @@
     // Protected Constants
     //
     // Log instance for this class
- protected static Log log = LogFactory.getLog(GridRenderer.class);
+ private static final Log log = LogFactory.getLog(GridRenderer.class);
    
     //
     // Class Variables
Index: src/com/sun/faces/renderkit/html_basic/GroupRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/GroupRenderer.java,v
retrieving revision 1.23
diff -u -r1.23 GroupRenderer.java
--- src/com/sun/faces/renderkit/html_basic/GroupRenderer.java 12 Jan
2005 21:37:35 -0000 1.23
+++ src/com/sun/faces/renderkit/html_basic/GroupRenderer.java 16 May
2005 17:41:24 -0000
@@ -32,7 +32,7 @@
     // Protected Constants
     //
     // Log instance for this class
- protected static Log log = LogFactory.getLog(GroupRenderer.class);
+ private static final Log log = LogFactory.getLog(GroupRenderer.class);
 
     //
     // Class Variables
Index: src/com/sun/faces/renderkit/html_basic/HtmlBasicInputRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlBasicInputRenderer.java,v
retrieving revision 1.27
diff -u -r1.27 HtmlBasicInputRenderer.java
---
src/com/sun/faces/renderkit/html_basic/HtmlBasicInputRenderer.java 5
May 2005 20:51:25 -0000 1.27
+++
src/com/sun/faces/renderkit/html_basic/HtmlBasicInputRenderer.java 16
May 2005 17:41:24 -0000
@@ -11,11 +11,7 @@
 
 package com.sun.faces.renderkit.html_basic;
 
-import com.sun.faces.util.Util;
-import com.sun.faces.util.MessageFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
+import javax.el.ValueExpression;
 import javax.faces.application.Application;
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIInput;
@@ -23,7 +19,12 @@
 import javax.faces.context.FacesContext;
 import javax.faces.convert.Converter;
 import javax.faces.convert.ConverterException;
-import javax.el.ValueExpression;
+
+import com.sun.faces.util.MessageFactory;
+import com.sun.faces.util.Util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * <B>HtmlBasicInputRenderer</B> is a base class for implementing renderers
@@ -36,7 +37,7 @@
     // Protected Constants
     //
     // Log instance for this class
- protected static Log log =
LogFactory.getLog(HtmlBasicInputRenderer.class);
+ private static final Log log =
LogFactory.getLog(HtmlBasicInputRenderer.class);
    
     //
     // Class Variables
Index: src/com/sun/faces/renderkit/html_basic/HtmlBasicRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/HtmlBasicRenderer.java,v
retrieving revision 1.91
diff -u -r1.91 HtmlBasicRenderer.java
--- src/com/sun/faces/renderkit/html_basic/HtmlBasicRenderer.java 2
May 2005 12:49:57 -0000 1.91
+++ src/com/sun/faces/renderkit/html_basic/HtmlBasicRenderer.java 16
May 2005 17:41:25 -0000
@@ -104,10 +104,8 @@
         if (log.isTraceEnabled()) {
             log.trace("Begin decoding component " + component.getId());
         }
- UIInput uiInput = null;
- if (component instanceof UIInput) {
- uiInput = (UIInput) component;
- } else {
+
+ if (!(component instanceof UIInput)) {
             // decode needs to be invoked only for components that are
             // instances or subclasses of UIInput.
             if (log.isTraceEnabled()) {
@@ -307,10 +305,8 @@
 
         // If there is a converter attribute, use it to to ask application
         // instance for a converter with this identifer.
+ converter = ((ValueHolder) component).getConverter();
 
- if (component instanceof ValueHolder) {
- converter = ((ValueHolder) component).getConverter();
- }
 
         // if value is null and no converter attribute is specified, then
         // return a zero length String.
@@ -332,27 +328,14 @@
 
             // if there is no default converter available for this
identifier,
             // assume the model type to be String.
- if (converter == null && currentValue != null) {
+ if (converter == null) {
                 result = currentValue.toString();
                 return result;
             }
         }
 
- if (converter != null) {
- result = converter.getAsString(context, component,
currentValue);
+ return converter.getAsString(context, component, currentValue);
 
- return result;
- } else {
- // throw converter exception if no converter can be
- // identified
- Object [] params = {
- currentValue,
- "null Converter"
- };
-
- throw new ConverterException(MessageFactory.getMessage(
- context, Util.CONVERSION_ERROR_MESSAGE_ID, params));
- }
     }
 
 
@@ -547,7 +530,7 @@
 
 
     //inner class to store parameter name and value pairs
- protected class Param {
+ protected static class Param {
 
         public Param(String name, String value) {
             set(name, value);
Index: src/com/sun/faces/renderkit/html_basic/ImageRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/ImageRenderer.java,v
retrieving revision 1.37
diff -u -r1.37 ImageRenderer.java
--- src/com/sun/faces/renderkit/html_basic/ImageRenderer.java 21 Apr
2005 18:55:36 -0000 1.37
+++ src/com/sun/faces/renderkit/html_basic/ImageRenderer.java 16 May
2005 17:41:26 -0000
@@ -36,7 +36,7 @@
     // Protected Constants
     //
     // Log instance for this class
- protected static Log log = LogFactory.getLog(ImageRenderer.class);
+ private static final Log log = LogFactory.getLog(ImageRenderer.class);
    
     //
     // Class Variables
Index: src/com/sun/faces/renderkit/html_basic/LabelRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/LabelRenderer.java,v
retrieving revision 1.36
diff -u -r1.36 LabelRenderer.java
--- src/com/sun/faces/renderkit/html_basic/LabelRenderer.java 21 Apr
2005 18:55:36 -0000 1.36
+++ src/com/sun/faces/renderkit/html_basic/LabelRenderer.java 16 May
2005 17:41:27 -0000
@@ -11,16 +11,17 @@
 
 package com.sun.faces.renderkit.html_basic;
 
-import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.IOException;
 
-import javax.faces.component.UIComponent;
 import javax.faces.component.NamingContainer;
+import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 
-import java.io.IOException;
+import com.sun.faces.util.Util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * <p><B>LabelRenderer</B> renders Label element.<p>.
@@ -76,11 +77,10 @@
             log.trace("Begin decoding component " + component.getId());
         }
         ResponseWriter writer = null;
- String
- forValue = null,
- style = (String) component.getAttributes().get("style"),
- styleClass = (String)
component.getAttributes().get("styleClass");
-
+ String forValue = null;
+ String styleClass = (String)
+ component.getAttributes().get("styleClass");
+
         // suppress rendering if "rendered" property on the component is
         // false.
         if (!component.isRendered()) {
@@ -165,7 +165,7 @@
         // render label end element if RENDER_END_ELEMENT is set.
         String render = (String) component.getAttributes().get(
             RENDER_END_ELEMENT);
- if (render != null && render.equals("yes")) {
+ if ("yes".equals(render)) {
             component.getAttributes().remove(RENDER_END_ELEMENT);
             ResponseWriter writer = context.getResponseWriter();
             assert (writer != null);
Index: src/com/sun/faces/renderkit/html_basic/LinkRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/LinkRenderer.java,v
retrieving revision 1.10
diff -u -r1.10 LinkRenderer.java
--- src/com/sun/faces/renderkit/html_basic/LinkRenderer.java 31 Mar
2004 18:48:37 -0000 1.10
+++ src/com/sun/faces/renderkit/html_basic/LinkRenderer.java 16 May
2005 17:41:27 -0000
@@ -11,14 +11,14 @@
 
 package com.sun.faces.renderkit.html_basic;
 
-import com.sun.faces.util.Util;
+import java.io.IOException;
 
 import javax.faces.component.UICommand;
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIOutput;
 import javax.faces.context.FacesContext;
 
-import java.io.IOException;
+import com.sun.faces.util.Util;
 
 
 /**
@@ -31,8 +31,7 @@
     //
     // Protected Constants
     //
- // Separator character
- private final char QUOTE = '\"';
+ // Separator character
 
 
     //
Index: src/com/sun/faces/renderkit/html_basic/MenuRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/MenuRenderer.java,v
retrieving revision 1.57
diff -u -r1.57 MenuRenderer.java
--- src/com/sun/faces/renderkit/html_basic/MenuRenderer.java 5 May
2005 20:51:25 -0000 1.57
+++ src/com/sun/faces/renderkit/html_basic/MenuRenderer.java 16 May
2005 17:41:28 -0000
@@ -229,14 +229,18 @@
                                      newValues);
         }
     if (throwException) {
- String values = "";
+ StringBuffer values = new StringBuffer();
         if (null != newValues) {
         for (int i = 0; i < newValues.length; i++) {
- values = values + " " + newValues[i];
+ if (i == 0) {
+ values.append(newValues[i]);
+ } else {
+ values.append(' ').append(newValues[i]);
+ }
         }
         }
         Object [] params = {
- values,
+ values.toString(),
         valueExpression.getExpressionString()
         };
         throw new ConverterException
@@ -262,9 +266,7 @@
         Object result = null;
         Class elementType = null;
         Converter converter = null;
- int
- i = 0,
- len = (null != newValues ? newValues.length : 0);
+ int len = (null != newValues ? newValues.length : 0);
 
         elementType = arrayClass.getComponentType();
 
@@ -297,12 +299,16 @@
                 if (elementType.equals(Object.class)) {
                     return newValues;
                 }
- String valueStr = "";
- for (i = 0; i < newValues.length; i++) {
- valueStr = valueStr + " " + newValues[i];
+ StringBuffer valueStr = new StringBuffer();
+ for (int i = 0; i < len; i++) {
+ if (i == 0) {
+ valueStr.append(newValues[i]);
+ } else {
+ valueStr.append(' ').append(newValues[i]);
+ }
         }
         Object [] params = {
- valueStr,
+ valueStr.toString(),
             "null Converter"
         };
 
@@ -313,7 +319,7 @@
 
         assert (null != result);
         if (elementType.isPrimitive()) {
- for (i = 0; i < len; i++) {
+ for (int i = 0; i < len; i++) {
                 if (elementType.equals(Boolean.TYPE)) {
                     Array.setBoolean(result, i,
                                      ((Boolean)
converter.getAsObject(context,
@@ -357,7 +363,7 @@
                 }
             }
         } else {
- for (i = 0; i < len; i++) {
+ for (int i = 0; i < len; i++) {
                 if (log.isDebugEnabled()) {
                     Object converted = converter.getAsObject(context,
                                                              uiSelectMany,
Index: src/com/sun/faces/renderkit/html_basic/OutputLinkRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/OutputLinkRenderer.java,v
retrieving revision 1.17
diff -u -r1.17 OutputLinkRenderer.java
--- src/com/sun/faces/renderkit/html_basic/OutputLinkRenderer.java 16
Dec 2004 17:56:38 -0000 1.17
+++ src/com/sun/faces/renderkit/html_basic/OutputLinkRenderer.java 16
May 2005 17:41:28 -0000
@@ -11,17 +11,18 @@
 
 package com.sun.faces.renderkit.html_basic;
 
-import com.sun.faces.util.Util;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.IOException;
+import java.util.Iterator;
 
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIOutput;
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 
-import java.io.IOException;
-import java.util.Iterator;
+import com.sun.faces.util.Util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 
 /**
@@ -38,7 +39,7 @@
     // Protected Constants
     //
     // Log instance for this class
- protected static Log log = LogFactory.getLog(OutputLinkRenderer.class);
+ private static final Log log =
LogFactory.getLog(OutputLinkRenderer.class);
 
     // Separator character
 
@@ -97,9 +98,6 @@
     }
 
 
- private String clientId = null;
-
-
     public void encodeBegin(FacesContext context, UIComponent component)
         throws IOException {
         if (context == null || component == null) {
@@ -136,16 +134,13 @@
             hrefVal = "";
         }
 
- clientId = output.getClientId(context);
-
         //Write Anchor attributes
 
         LinkRenderer.Param paramList[] = getParamList(context, component);
- StringBuffer sb = new StringBuffer();
         int
             i = 0,
             len = paramList.length;
- sb = new StringBuffer();
+ StringBuffer sb = new StringBuffer();
         sb.append(hrefVal);
         if (0 < len) {
             sb.append("?");
Index: src/com/sun/faces/renderkit/html_basic/TableRenderer.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/renderkit/html_basic/TableRenderer.java,v
retrieving revision 1.25
diff -u -r1.25 TableRenderer.java
--- src/com/sun/faces/renderkit/html_basic/TableRenderer.java 22 Feb
2005 15:56:17 -0000 1.25
+++ src/com/sun/faces/renderkit/html_basic/TableRenderer.java 16 May
2005 17:41:29 -0000
@@ -32,7 +32,7 @@
 public class TableRenderer extends HtmlBasicRenderer {
 
     // Log instance for this class
- protected static Log log = LogFactory.getLog(ButtonRenderer.class);
+ private static final Log log = LogFactory.getLog(ButtonRenderer.class);
 
 
     public boolean getRendersChildren() {
Index: src/com/sun/faces/taglib/FacesValidator.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/taglib/FacesValidator.java,v
retrieving revision 1.13
diff -u -r1.13 FacesValidator.java
--- src/com/sun/faces/taglib/FacesValidator.java 2 Dec 2004 18:42:23
-0000 1.13
+++ src/com/sun/faces/taglib/FacesValidator.java 16 May 2005 17:41:31
-0000
@@ -9,9 +9,7 @@
 
 package com.sun.faces.taglib;
 
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
+import java.io.IOException;
 
 import javax.servlet.jsp.tagext.PageData;
 import javax.servlet.jsp.tagext.TagLibraryValidator;
@@ -20,7 +18,9 @@
 import javax.xml.parsers.SAXParser;
 import javax.xml.parsers.SAXParserFactory;
 
-import java.io.IOException;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
 
 /**
  * <p>Base class for all faces TLVs</p>
@@ -42,13 +42,15 @@
     //*********************************************************************
     // Constants
 
- final String JSF_CORE_URI = "http://java.sun.com/jsf/core";
+ private static final String JSF_CORE_URI =
"http://java.sun.com/jsf/core";
 
- final String JSF_HTML_URI = "http://java.sun.com/jsf/html";
+ private static final String JSF_HTML_URI =
"http://java.sun.com/jsf/html";
 
- final String JSTL_OLD_CORE_URI = "http://java.sun.com/jstl/core";
+ private static final String JSTL_OLD_CORE_URI =
+ "http://java.sun.com/jstl/core";
 
- final String JSTL_NEW_CORE_URI = "http://java.sun.com/jsp/jstl/core";
+ private static final String JSTL_NEW_CORE_URI =
+ "http://java.sun.com/jsp/jstl/core";
 
     // Prefix for JSF HTML tags
     protected String JSF_HTML_PRE = null;
@@ -217,7 +219,7 @@
      * @param prefix Value of directive prefix argument.
      * @param uri Value of directive uri argument.
      * @param page JspData page object.
- * @returns ValidationMessage[] An array of Validation messages.
+ * @return ValidationMessage[] An array of Validation messages.
      */
     public synchronized ValidationMessage[] validate(String prefix,
String uri, PageData page) {
         ValidationMessage[] result = null;
@@ -267,7 +269,7 @@
      * Construct a ValidationMessage[] from a single String and no ID.
      *
      * @param message Message string.
- * @returns ValidationMessage[] An array of Validation Messages.
+ * @return ValidationMessage[] An array of Validation Messages.
      */
     private ValidationMessage[] vmFromString(String message) {
         return new ValidationMessage[]{
Index: src/com/sun/faces/taglib/html_basic/ColumnTag.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/taglib/html_basic/ColumnTag.java,v
retrieving revision 1.9
diff -u -r1.9 ColumnTag.java
--- src/com/sun/faces/taglib/html_basic/ColumnTag.java 22 Feb 2005
15:56:17 -0000 1.9
+++ src/com/sun/faces/taglib/html_basic/ColumnTag.java 16 May 2005
17:41:31 -0000
@@ -10,21 +10,21 @@
 
 package com.sun.faces.taglib.html_basic;
 
-import com.sun.faces.util.Util;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import javax.faces.component.UIColumn;
 import javax.faces.component.UIComponent;
 import javax.faces.el.ValueBinding;
 import javax.faces.webapp.UIComponentTag;
 import javax.servlet.jsp.JspException;
 
+import com.sun.faces.util.Util;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 
 public class ColumnTag extends UIComponentTag {
 
- public static Log log = LogFactory.getLog(ColumnTag.class);
+ private static final Log log = LogFactory.getLog(ColumnTag.class);
 
 
 
Index: src/com/sun/faces/taglib/jsf_core/ActionListenerTag.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/taglib/jsf_core/ActionListenerTag.java,v
retrieving revision 1.19
diff -u -r1.19 ActionListenerTag.java
--- src/com/sun/faces/taglib/jsf_core/ActionListenerTag.java 5 May
2005 20:51:25 -0000 1.19
+++ src/com/sun/faces/taglib/jsf_core/ActionListenerTag.java 16 May
2005 17:41:31 -0000
@@ -58,7 +58,7 @@
     // -------------------------------------------------------------
Attributes
 
 
- protected static Log log = LogFactory.getLog(ActionListenerTag.class);
+ private static final Log log =
LogFactory.getLog(ActionListenerTag.class);
 
     /**
      * <p>The fully qualified class name of the {_at_link ActionListener}
Index: src/com/sun/faces/taglib/jsf_core/ValueChangeListenerTag.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/taglib/jsf_core/ValueChangeListenerTag.java,v
retrieving revision 1.12
diff -u -r1.12 ValueChangeListenerTag.java
--- src/com/sun/faces/taglib/jsf_core/ValueChangeListenerTag.java 5
May 2005 20:51:27 -0000 1.12
+++ src/com/sun/faces/taglib/jsf_core/ValueChangeListenerTag.java 16
May 2005 17:41:32 -0000
@@ -10,23 +10,23 @@
 package com.sun.faces.taglib.jsf_core;
 
 
-import javax.el.ValueExpression;
 import javax.el.ELException;
+import javax.el.ValueExpression;
 import javax.faces.component.EditableValueHolder;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 import javax.faces.event.ValueChangeListener;
-import javax.faces.webapp.UIComponentTag;
 import javax.faces.webapp.UIComponentClassicTagBase;
 import javax.faces.webapp.UIComponentELTag;
+import javax.faces.webapp.UIComponentTag;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;
 
+import com.sun.faces.util.Util;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import com.sun.faces.util.Util;
-
 /**
  * <p>Tag implementation that creates a {_at_link ValueChangeListener}
instance
  * and registers it on the {_at_link UIComponent} associated with our most
@@ -57,7 +57,8 @@
 
     // -------------------------------------------------------------
Attributes
 
- protected static Log log =
LogFactory.getLog(ValueChangeListenerTag.class);
+ private static final Log log =
+ LogFactory.getLog(ValueChangeListenerTag.class);
 
 
     /**
Index: src/com/sun/faces/taglib/jsf_core/ViewTag.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/taglib/jsf_core/ViewTag.java,v
retrieving revision 1.35
diff -u -r1.35 ViewTag.java
--- src/com/sun/faces/taglib/jsf_core/ViewTag.java 5 May 2005
20:51:28 -0000 1.35
+++ src/com/sun/faces/taglib/jsf_core/ViewTag.java 16 May 2005
17:41:32 -0000
@@ -59,7 +59,7 @@
     // Class Variables
     //
 
- protected static Log log = LogFactory.getLog(ViewTag.class);
+ private static final Log log = LogFactory.getLog(ViewTag.class);
 
     //
     // Instance Variables
Index: systest/build-tests.xml
===================================================================
RCS file: /cvs/javaserverfaces-sources/jsf-ri/systest/build-tests.xml,v
retrieving revision 1.76
diff -u -r1.76 build-tests.xml
--- systest/build-tests.xml 12 May 2005 22:49:17 -0000 1.76
+++ systest/build-tests.xml 16 May 2005 17:41:38 -0000
@@ -233,9 +233,7 @@
         <fileset dir="${basedir}/build/WEB-INF/classes"
                
includes="com/sun/faces/jsptest/*TestCase.class"
                excludes="com/sun/faces/jsptest/ListenerTestCase.class,
- com/sun/faces/jsptest/JspIntegrationTestCase.class,
- com/sun/faces/jsptest/ValidatorTestCase.class,
- com/sun/faces/jsptest/ConverterTestCase.class"/>
+
com/sun/faces/jsptest/JspIntegrationTestCase.class"/>
       </batchtest>
 
     </junit>
Index: systest/src/com/sun/faces/jsptest/ValidatorTestCase.java
===================================================================
RCS file:
/cvs/javaserverfaces-sources/jsf-ri/systest/src/com/sun/faces/jsptest/ValidatorTestCase.java,v
retrieving revision 1.4
diff -u -r1.4 ValidatorTestCase.java
--- systest/src/com/sun/faces/jsptest/ValidatorTestCase.java 26 Apr
2005 16:41:39 -0000 1.4
+++ systest/src/com/sun/faces/jsptest/ValidatorTestCase.java 16 May
2005 17:41:39 -0000
@@ -9,23 +9,16 @@
 
 package com.sun.faces.jsptest;
 
-import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
-import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.html.HtmlBody;
-import com.gargoylesoftware.htmlunit.html.HtmlElement;
-import com.gargoylesoftware.htmlunit.html.HtmlForm;
+import java.util.List;
+
+import com.sun.faces.htmlunit.AbstractTestCase;
+
 import com.gargoylesoftware.htmlunit.html.HtmlPage;
 import com.gargoylesoftware.htmlunit.html.HtmlSubmitInput;
 import com.gargoylesoftware.htmlunit.html.HtmlTextInput;
-import com.sun.faces.htmlunit.AbstractTestCase;
 import junit.framework.Test;
-import junit.framework.TestCase;
 import junit.framework.TestSuite;
 
-import java.util.List;
-
-import javax.faces.component.NamingContainer;
-
 /**
  * <p>Test that invalid values don't cause valueChangeEvents to occur.</p>
  */
@@ -104,13 +97,12 @@
         list = getAllElementsOfGivenClass(page, null,
                                           HtmlSubmitInput.class);
         HtmlSubmitInput button = (HtmlSubmitInput) list.get(0);
- page = (HtmlPage) button.click();
-
- assertTrue(-1 != page.asText().indexOf("_id1:dr1: Validation
Error: Specified attribute is not between the expected values of 2 and
5."));
+ page = (HtmlPage) button.click();
+ assertTrue(-1 != page.asText().indexOf("_id_id17:dr1:
Validation Error: Specified attribute is not between the expected values
of 2 and 5."));
         assertTrue(-1 != page.asText().indexOf("DoubleRange2:
Validation Error: Specified attribute is not between the expected values
of 2 and 5."));
- assertTrue(-1 != page.asText().indexOf("_id1:l1: Validation
Error: Value is less than allowable minimum of '2'"));
+ assertTrue(-1 != page.asText().indexOf("_id_id17:l1: Validation
Error: Value is less than allowable minimum of '2'"));
         assertTrue(-1 != page.asText().indexOf("Length2: Validation
Error: Value is less than allowable minimum of '2'"));
- assertTrue(-1 != page.asText().indexOf("id1:lr1: Validation
Error: Specified attribute is not between the expected values of 2 and
5."));
+ assertTrue(-1 != page.asText().indexOf("_id_id17:lr1:
Validation Error: Specified attribute is not between the expected values
of 2 and 5."));
         assertTrue(-1 != page.asText().indexOf("LongRange2: Validation
Error: Specified attribute is not between the expected values of 2 and
5."));
     }