incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r427760 [1/4] - in /incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad: bean/ bean/util/ change/ component/ config/ context/ convert/ event/ logging/ model/ render/ resource/ util/ validator/ webapp/
Date Tue, 01 Aug 2006 22:00:48 GMT
Author: awiner
Date: Tue Aug  1 15:00:44 2006
New Revision: 427760

URL: http://svn.apache.org/viewvc?rev=427760&view=rev
Log:
Commit most of patch for ADFFACES-72: Convert Trinidad to Java 5 standards and clean-up code.  (See bug for details).
This patch includes ADFFACES-73: <af:convert*/> does not allow EL in MessageDetail attributes with server side validation.

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanFactory.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/PropertyKey.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/FlaggedPropertyMap.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/PropertyArrayMap.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/PropertyHashMap.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/StateUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/ValueMap.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/AddChildComponentChange.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/AttributeComponentChange.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeComponentProxy.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeManager.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RemoveChildComponentChange.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RemoveFacetComponentChange.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ReorderChildrenComponentChange.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/SetFacetChildComponentChange.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/SetFacetChildDocumentChange.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ChildArrayList.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ChildLoop.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacesMessageWrapper.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacetHashMap.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/HierarchyUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TableUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TreeState.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXComponentBase.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXMenuHierarchy.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXNavigationHierarchy.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ValueMap.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/WrapperEvent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/config/RegionManager.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/Agent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/DialogService.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/PageFlowScopeProvider.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContext.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/context/RequestContextFactory.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ColorFormat.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/ConverterUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/DateTimeConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/NumberConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/convert/RGBColorFormat.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/AttributeChangeEvent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/DisclosureEvent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/FocusEvent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/LaunchEvent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/PollEvent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RangeChangeEvent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/ReturnEvent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowDisclosureEvent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowKeySetChangeEvent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/SelectionEvent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/SortEvent.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/logging/TrinidadLogRecord.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/logging/TrinidadLogger.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/BaseMenuModel.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ChildPropertyTreeModel.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/DefaultBoundedRangeModel.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ModelUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/PathHelper.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ProcessUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySet.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetImpl.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/SortCriterion.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/SortableModel.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/TreeModel.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ViewIdPropertyMenuModel.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/DialogRenderKitService.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/ExtendedRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/render/InternalView.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/AggregatingResourceLoader.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/CachingResourceLoader.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/ClassLoaderResourceLoader.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/DirectoryResourceLoader.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/DynamicResourceLoader.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/ProxyResourceLoader.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/RegexResourceLoader.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/ResourceLoader.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/ServletContextResourceLoader.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/resource/StringContentResourceLoader.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ArrayMap.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/Base64InputStream.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/Base64OutputStream.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ClassLoaderUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ListFromCollection.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/LocaleUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/MessageFactory.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/Service.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ByteLengthValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/DateTimeRangeValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/RegExpValidator.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/validator/ValidatorUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/ResourceServlet.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/TrinidadFilter.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/webapp/UIXComponentTag.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBean.java Tue Aug  1 15:00:44 2006
@@ -136,21 +136,21 @@
    *   universally needed by all consumers, so...
    * @exception IllegalArgumentException if the key is not a list key.
    */
-  public Object[] getEntries(PropertyKey listKey, Class clazz);
+  public Object[] getEntries(PropertyKey listKey, Class<?> clazz);
 
   /**
    * Return true if at least one element of the list identified by
    * this key is an instance of the specified class.
    * @exception IllegalArgumentException if the key is not a list key.
    */
-  public boolean containsEntry(PropertyKey listKey, Class clazz);
+  public boolean containsEntry(PropertyKey listKey, Class<?> clazz);
 
   /**
    * Returns an iterator over all entries at this key.
    * @todo is this iterator read-only or read-write?
    * @exception IllegalArgumentException if the key is not a list key.
    */
-  public Iterator entries(PropertyKey listKey);
+  public Iterator<Object> entries(PropertyKey listKey);
 
   /**
    * Copies all properties, bindings, and list entries from
@@ -166,12 +166,12 @@
    * Returns a Set of all PropertyKeys that have either lists
    *  or values attached.
    */
-  public Set keySet();
+  public Set<PropertyKey> keySet();
 
   /**
    * Returns a Set of all PropertyKeys that have ValueBindings attached.
    */
-  public Set bindingKeySet();
+  public Set<PropertyKey> bindingKeySet();
 
   public void markInitialState();
 
@@ -226,9 +226,9 @@
      *    or the key does not already exists.
      */
     public final PropertyKey registerKey(
-      String name,
-      Class  type,
-      Object defaultValue)
+      String   name,
+      Class<?> type,
+      Object   defaultValue)
     {
       return registerKey(name, type, defaultValue, 0);
     }
@@ -239,8 +239,8 @@
      *    or the key does not already exists.
      */
     public final PropertyKey registerKey(
-      String name,
-      Class  type)
+      String   name,
+      Class<?> type)
     {
       return registerKey(name, type, null, 0);
     }
@@ -274,9 +274,9 @@
      *    or the key does not already exists.
      */
     public final PropertyKey registerKey(
-      String name,
-      Class  type,
-      int    capabilities)
+      String   name,
+      Class<?> type,
+      int      capabilities)
     {
       return registerKey(name, type, null, capabilities);
     }
@@ -304,10 +304,10 @@
      *    or the key already exists.
      */
     public PropertyKey registerKey(
-      String name, 
-      Class  type,
-      Object defaultValue,
-      int    capabilities)
+      String   name, 
+      Class<?> type,
+      Object   defaultValue,
+      int      capabilities)
     {
       _checkLocked();
       _checkName(name);
@@ -355,11 +355,11 @@
     }
 
     protected PropertyKey createPropertyKey(
-      String name,
-      Class  type,
-      Object defaultValue,
-      int    capabilities,
-      int    index)
+      String   name,
+      Class<?> type,
+      Object   defaultValue,
+      int      capabilities,
+      int      index)
     {
       if (_superType != null)
       {

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanFactory.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanFactory.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanFactory.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanFactory.java Tue Aug  1 15:00:44 2006
@@ -22,7 +22,6 @@
 import java.util.Collections;
 import java.util.Enumeration;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 import java.util.Properties;
@@ -41,8 +40,8 @@
    * @todo change from ownerClass to componentFamily
    */
   static public FacesBean createFacesBean(
-    Class  ownerClass,
-    String rendererType)
+    Class<?> ownerClass,
+    String   rendererType)
   {
     if (ownerClass == null)
       return null;
@@ -73,7 +72,7 @@
 
     try
     {
-      Class type = _getClassLoader().loadClass(className);
+      Class<?> type = _getClassLoader().loadClass(className);
       return (FacesBean) type.newInstance();
     }
     catch (ClassNotFoundException cnfe)
@@ -94,13 +93,13 @@
 
   static private void _initializeBeanTypes()
   {
-    _TYPES_MAP = new HashMap();
+    _TYPES_MAP = new HashMap<Object, Object>();
 
-    List list = new ArrayList();
+    List<URL> list = new ArrayList<URL>();
     try
     {
-      Enumeration en = _getClassLoader().getResources(
-                             "META-INF/faces-bean.properties");
+      Enumeration<URL> en = _getClassLoader().getResources(
+                                "META-INF/faces-bean.properties");
       while (en.hasMoreElements())
       {
         list.add(en.nextElement());
@@ -120,10 +119,9 @@
         _LOG.info("No faces-bean.properties files located");
     }
 
-    Iterator iterator = list.iterator();
-    while (iterator.hasNext())
+    for(URL url : list)
     {
-      _initializeBeanTypes((URL) iterator.next());
+      _initializeBeanTypes(url);
     }
   }
 
@@ -154,7 +152,7 @@
   }
 
   static private final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(FacesBeanFactory.class);
-  static private       Map    _TYPES_MAP;
+  static private       Map<Object, Object> _TYPES_MAP;
 
   static
   {

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/FacesBeanImpl.java Tue Aug  1 15:00:44 2006
@@ -146,7 +146,7 @@
   {
     _checkListKey(listKey);
 
-    List l = (List) getLocalPropertyImpl(listKey);
+    List<Object> l = (List<Object>) getLocalPropertyImpl(listKey);
     if (l == null)
     {
       l = _createList();
@@ -161,11 +161,12 @@
       setPropertyImpl(listKey, l);
   }
 
+  @SuppressWarnings("unchecked")
   final public void removeEntry(PropertyKey listKey, Object value)
   {
     _checkListKey(listKey);
 
-    List l = (List) getLocalPropertyImpl(listKey);
+    List<Object> l = (List<Object>) getLocalPropertyImpl(listKey);
     if (l != null)
     {
       l.remove(value);
@@ -199,11 +200,12 @@
                                                          tempList.size()));
   }
 
-  final public boolean containsEntry(PropertyKey listKey, Class clazz)
+  @SuppressWarnings("unchecked")
+  final public boolean containsEntry(PropertyKey listKey, Class<?> clazz)
   {
     _checkListKey(listKey);
 
-    List l = (List) getLocalPropertyImpl(listKey);
+    List<Object> l = (List<Object>) getLocalPropertyImpl(listKey);
     if (l == null)
       return false;
 
@@ -218,11 +220,12 @@
     return false;
   }
 
-  final public Iterator entries(PropertyKey listKey)
+  @SuppressWarnings("unchecked")
+  final public Iterator<Object> entries(PropertyKey listKey)
   {
     _checkListKey(listKey);
 
-    List l = (List) getLocalPropertyImpl(listKey);
+    List<Object> l = (List<Object>) getLocalPropertyImpl(listKey);
     if (l == null)
       return Collections.EMPTY_LIST.iterator();
 
@@ -238,10 +241,8 @@
     if (from == this)
       return;
 
-    Iterator keys = from.keySet().iterator();
-    while (keys.hasNext())
+    for(PropertyKey fromKey : from.keySet())
     {
-      PropertyKey fromKey = (PropertyKey) keys.next();
       PropertyKey toKey = _convertKey(fromKey);
       if ((toKey != null) &&
           _isCompatible(fromKey, toKey))
@@ -252,17 +253,15 @@
         }
         else
         {
-          Iterator entries = from.entries(fromKey);
+          Iterator<Object> entries = from.entries(fromKey);
           while (entries.hasNext())
             addEntry(toKey, entries.next());
         }
       }
     }
 
-    Iterator bindings = from.bindingKeySet().iterator();
-    while (bindings.hasNext())
+    for(PropertyKey fromKey : from.bindingKeySet())
     {
-      PropertyKey fromKey = (PropertyKey) bindings.next();
       PropertyKey toKey = _convertKey(fromKey);
       if (toKey.getSupportsBinding())
       {
@@ -272,7 +271,8 @@
   }
 
 
-  final public Set keySet()
+  @SuppressWarnings("unchecked")
+  final public Set<PropertyKey> keySet()
   {
     if (_properties == null)
       return Collections.EMPTY_SET;
@@ -280,7 +280,8 @@
     return _properties.keySet();
   }
 
-  final public Set bindingKeySet()
+  @SuppressWarnings("unchecked")
+  final public Set<PropertyKey> bindingKeySet()
   {
     if (_bindings == null)
       return Collections.EMPTY_SET;
@@ -401,9 +402,9 @@
   // "listKey" is unused, but it seems plausible that
   // if this ever gets converted to a protected hook that
   // "listKey" may be useful in that context.
-  private List _createList(/*PropertyKey listKey*/)
+  private List<Object> _createList(/*PropertyKey listKey*/)
   {
-    return new ArrayList();
+    return new ArrayList<Object>();
   }
 
   /**

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/PropertyKey.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/PropertyKey.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/PropertyKey.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/PropertyKey.java Tue Aug  1 15:00:44 2006
@@ -79,27 +79,27 @@
   }
   
   PropertyKey(
-    String name,
-    Class  type)
+    String   name,
+    Class<?> type)
   {
     this(name, type, null);
   }
 
   PropertyKey(
-    String name,
-    Class  type,
-    Object defaultValue)
+    String   name,
+    Class<?> type,
+    Object   defaultValue)
   {
     this(name, type, defaultValue, _CAPS_DEFAULT, -1);
   }
 
   // Needs to be protected for UINodePropertyKey implementation
   protected PropertyKey(
-    String name,
-    Class  type,
-    Object defaultValue,
-    int    capabilities,
-    int    index)
+    String   name,
+    Class<?> type,
+    Object   defaultValue,
+    int      capabilities,
+    int      index)
   {
     if (name == null)
       throw new NullPointerException();
@@ -110,7 +110,7 @@
     if (defaultValue != null)
     {
       // Ensure that default value is legal for this property type.
-      Class boxedType = _getBoxedType(type);
+      Class<?> boxedType = _getBoxedType(type);
       if (!boxedType.isAssignableFrom(defaultValue.getClass()))
       {
         throw new IllegalStateException(
@@ -149,7 +149,7 @@
   /**
    * Returns the type of this property.
    */
-  public Class getType()
+  public Class<?> getType()
   {
     return _type;
   }
@@ -238,6 +238,7 @@
   }
 
   
+  @Override
   public boolean equals(Object o)
   {
     if (o == this)
@@ -269,11 +270,13 @@
     return false;
   }
 
+  @Override
   public int hashCode()
   {
     return _hashCode;
   }
 
+  @Override
   public String toString()
   {
     String className = getClass().getName();
@@ -292,21 +295,21 @@
   }
 
   static private Object _getJavaDefault(
-    Class type)
+    Class<?> type)
   {
     return _PRIMITIVE_DEFAULTS.get(type);
   }
   
-  static private Class _getBoxedType(
-    Class type)
+  static private Class<?> _getBoxedType(
+    Class<?> type)
   {
-    Class boxedType = (Class)_BOXED_PRIMITIVES.get(type);
+    Class<?> boxedType = _BOXED_PRIMITIVES.get(type);
     return (boxedType != null ? boxedType : type);
   }
   
-  static private Map _createPrimitiveDefaults()
+  static private Map<Class<?>, Object> _createPrimitiveDefaults()
   {
-    Map map = new HashMap();
+    Map<Class<?>, Object> map = new HashMap<Class<?>, Object>();
     map.put(Boolean.TYPE, Boolean.FALSE);
     map.put(Byte.TYPE, new Byte((byte)0));
     map.put(Character.TYPE, new Character('\0'));
@@ -319,9 +322,9 @@
     return Collections.unmodifiableMap(map);
   }
 
-  static private Map _createBoxedPrimitives()
+  static private Map<Class<?>, Class<?>> _createBoxedPrimitives()
   {
-    Map map = new HashMap();
+    Map<Class<?>, Class<?>> map = new HashMap<Class<?>, Class<?>>();
     map.put(Boolean.TYPE, Boolean.class);
     map.put(Byte.TYPE, Byte.class);
     map.put(Character.TYPE, Character.class);
@@ -334,15 +337,15 @@
     return Collections.unmodifiableMap(map);
   }
 
-  static private final Map _PRIMITIVE_DEFAULTS = _createPrimitiveDefaults();
-  static private final Map _BOXED_PRIMITIVES   = _createBoxedPrimitives();
+  static private final Map<Class<?>, Object>   _PRIMITIVE_DEFAULTS = _createPrimitiveDefaults();
+  static private final Map<Class<?>, Class<?>> _BOXED_PRIMITIVES   = _createBoxedPrimitives();
 
-  private final int _hashCode;
-  private final String _name;
-  private final int    _index;
-  private final int    _capabilities;
-  private final Class  _type;
-  private final Object _default;
+  private final int     _hashCode;
+  private final String   _name;
+  private final int      _index;
+  private final int      _capabilities;
+  private final Class<?> _type;
+  private final Object   _default;
   private       FacesBean.Type _owner;
 
   static private final int _CAPS_DEFAULT = 
@@ -354,7 +357,7 @@
     CAP_LIST |
     CAP_STATE_HOLDER;
 
-  static private final Class _TYPE_DEFAULT = Object.class;
+  static private final Class<Object> _TYPE_DEFAULT = Object.class;
 
   static private final Object _OBJECT_NULL = new Object();
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/FlaggedPropertyMap.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/FlaggedPropertyMap.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/FlaggedPropertyMap.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/FlaggedPropertyMap.java Tue Aug  1 15:00:44 2006
@@ -32,6 +32,7 @@
 public class FlaggedPropertyMap extends AbstractMap<PropertyKey,Object>
                                 implements PropertyMap
 {
+  @Override
   public boolean containsKey(
     Object key)
   {
@@ -44,10 +45,11 @@
       return ((_flags & (1L << index)) == 0);
     }
 
-    Map map = getPropertyMap(false);
+    Map<PropertyKey, Object> map = getPropertyMap(false);
     return (map != null) ? map.containsKey(pKey) : false;
   }
 
+  @Override
   public Object get(
     Object key)
   {
@@ -63,10 +65,11 @@
       }
     }
 
-    Map map = getPropertyMap(false);
+    Map<PropertyKey, Object> map = getPropertyMap(false);
     return (map != null) ? map.get(key) : null;
   }
 
+  @Override
   public Object put(
     PropertyKey key,
     Object      value)
@@ -79,10 +82,11 @@
       _flags |= (1L << index);
     }
 
-    Map map = getPropertyMap(true);
+    Map<PropertyKey, Object> map = getPropertyMap(true);
     return map.put(key, value);
   }
 
+  @Override
   public Object remove(
     Object key)
   {
@@ -103,10 +107,11 @@
       _flags &= ~propertyMask;
     }
 
-    Map map = getPropertyMap(false);
+    Map<PropertyKey, Object> map = getPropertyMap(false);
     return (map != null) ? map.remove(key) : null;
   }
 
+  @Override
   public void putAll(Map<? extends PropertyKey, ? extends Object> t)
   {
     Iterator<? extends PropertyKey> iter = t.keySet().iterator();
@@ -126,13 +131,15 @@
       }
     }
 
-    Map map = getPropertyMap(true);
+    Map<PropertyKey, Object> map = getPropertyMap(true);
     map.putAll(t);
   }
 
+  @SuppressWarnings("unchecked")
+  @Override
   public Set<Map.Entry<PropertyKey, Object>> entrySet()
   {
-    Map map = getPropertyMap(false);
+    Map<PropertyKey, Object> map = getPropertyMap(false);
     if ((map == null) || map.isEmpty())
       return Collections.EMPTY_SET;
 
@@ -142,9 +149,11 @@
   /**
    * @todo Optimize to take advantage of flags.
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public Set<PropertyKey> keySet()
   {
-    Map map = getPropertyMap(false);
+    Map<PropertyKey, Object> map = getPropertyMap(false);
     if ((map == null) || map.isEmpty())
       return Collections.EMPTY_SET;
 
@@ -152,9 +161,11 @@
   }
 
 
+  @SuppressWarnings("unchecked")
+  @Override
   public Collection<Object> values()
   {
-    Map map = getPropertyMap(false);
+    Map<PropertyKey, Object> map = getPropertyMap(false);
     if ((map == null) || map.isEmpty())
       return Collections.EMPTY_SET;
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/PropertyArrayMap.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/PropertyArrayMap.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/PropertyArrayMap.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/PropertyArrayMap.java Tue Aug  1 15:00:44 2006
@@ -46,6 +46,7 @@
     return getByIdentity(pKey);
   }
 
+  @Override
   public Object put(
     PropertyKey key,
     Object      value)
@@ -60,6 +61,7 @@
     return retValue;
   }
 
+  @Override
   public Object remove(
     Object key)
   {
@@ -76,6 +78,7 @@
     return super.remove(key);
   }
 
+  @Override
   public void putAll(Map<? extends PropertyKey, ? extends Object> t)
   {
     if (_createDeltas())

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/PropertyHashMap.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/PropertyHashMap.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/PropertyHashMap.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/PropertyHashMap.java Tue Aug  1 15:00:44 2006
@@ -51,6 +51,7 @@
     super();
   }
 
+  @Override
   public Object put(
     PropertyKey key,
     Object      value)
@@ -65,6 +66,7 @@
     return retValue;
   }
 
+  @Override
   public Object remove(
     Object key)
   {
@@ -81,6 +83,7 @@
     return super.remove(key);
   }
 
+  @Override
   public void putAll(Map<? extends PropertyKey, ? extends Object> t)
   {
     if (_createDeltas())

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/StateUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/StateUtils.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/StateUtils.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/StateUtils.java Tue Aug  1 15:00:44 2006
@@ -18,7 +18,6 @@
 import java.io.Serializable;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
@@ -88,12 +87,10 @@
       return null;
 
     Object[] values = new Object[2 * size];
-    Iterator entries = map.entrySet().iterator();
     int i = 0;
-    while (entries.hasNext())
+    for(Map.Entry<PropertyKey, Object> entry : map.entrySet())
     {
-      Map.Entry entry = (Map.Entry) entries.next();
-      PropertyKey key = (PropertyKey) entry.getKey();
+      PropertyKey key = entry.getKey();
       if (key.isTransient())
         continue;
 
@@ -206,6 +203,7 @@
   /**
    * Saves a List whose elements may implement StateHolder.
    */
+  @SuppressWarnings("unchecked")
   static public Object saveList(
     FacesContext context,
     Object       value)
@@ -213,14 +211,24 @@
     if (value == null)
       return null;
 
-    List list = (List) value;
+    List<Object> list = (List<Object>) value;
     int size = list.size();
     if (size == 0)
       return null;
 
     Object[] array = new Object[size];
-    for (int i = 0; i < size; i++)
-      array[i] = saveStateHolder(context, list.get(i));
+    // 2006-08-01: -= Simon Lessard =-
+    //             Inefficient loop if the list implementation 
+    //             ever change to a linked data structure. Use 
+    //             iterators instead
+    //for (int i = 0; i < size; i++)
+    //  array[i] = saveStateHolder(context, list.get(i));
+    int index = 0;
+    for(Object object : list)
+    {
+      array[index++] = saveStateHolder(context, object);
+    }
+    
     return array;
   }
 
@@ -239,12 +247,14 @@
     if (length == 0)
       return null;
 
-    List list = new ArrayList(length);
-    for (int i = 0; i < length; i++)
+    List<Object> list = new ArrayList<Object>(length);
+    for(Object state : array)
     {
-      Object restored = restoreStateHolder(context, array[i]);
+      Object restored = restoreStateHolder(context, state);
       if (restored != null)
+      {
         list.add(restored);
+      }
     }
 
     return list;
@@ -256,7 +266,7 @@
    * Instance used to save generic instances;  simply saves
    * the class name.
    */
-  static private class Saver implements java.io.Serializable
+  static private class Saver implements Serializable
   {
     public void saveState(FacesContext context, Object saved)
     {
@@ -268,7 +278,7 @@
       ClassLoader cl = _getClassLoader();
       try
       {
-        Class clazz = cl.loadClass(_name);
+        Class<?> clazz = cl.loadClass(_name);
         return clazz.newInstance();
       }
       catch (Throwable t)
@@ -287,12 +297,14 @@
    */
   static private class SHSaver extends Saver
   {
+    @Override
     public void saveState(FacesContext context, Object value)
     {
       super.saveState(context, value);
       _save = ((StateHolder) value).saveState(context);
     }
 
+    @Override
     public Object restoreState(FacesContext context)
     {
       Object o = super.restoreState(context);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/ValueMap.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/ValueMap.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/ValueMap.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/util/ValueMap.java Tue Aug  1 15:00:44 2006
@@ -35,13 +35,14 @@
  *
  * @author The Oracle ADF Faces Team
  */
-public class ValueMap extends AbstractMap
+public class ValueMap extends AbstractMap<Object, Object>
 {
   public ValueMap(FacesBean bean)
   {
     _bean = bean;
   }
 
+  @Override
   public Object get(Object key)
   {
     if (key == null)
@@ -52,7 +53,7 @@
     // properties
     if (propertyKey.isList())
     {
-      Class type = propertyKey.getType();
+      Class<?> type = propertyKey.getType();
       if (type.isArray())
         type = type.getComponentType();
 
@@ -65,6 +66,7 @@
     }
   }
 
+  @Override
   public Object put(Object key, Object value)
   {
     if (key == null)
@@ -87,6 +89,7 @@
   /**
    * @todo Should remove just remove values, or also remove bindings?
    */
+  @Override
   public Object remove(Object key)
   {
     PropertyKey propertyKey = _getPropertyKey(key);
@@ -98,11 +101,12 @@
     return oldValue;
   }
 
-  public Set entrySet()
+  @Override
+  public Set<Map.Entry<Object, Object>> entrySet()
   {
     if (_entries == null)
     {
-      HashSet keySet = new HashSet();
+      HashSet<PropertyKey> keySet = new HashSet<PropertyKey>();
       keySet.addAll(_bean.keySet());
       keySet.addAll(_bean.bindingKeySet());
       _entries = new MakeEntries(keySet);
@@ -111,18 +115,20 @@
     return _entries;
   }
 
-  private class MakeEntries extends AbstractSet
+  private class MakeEntries extends AbstractSet<Map.Entry<Object, Object>>
   {
-    public MakeEntries(Set keys)
+    public MakeEntries(Set<PropertyKey> keys)
     {
       _keys = keys;
     }
 
+    @Override
     public int size()
     {
       return _keys.size();
     }
 
+    @Override
     public boolean remove(Object o)
     {
       if (!(o instanceof EntryImpl))
@@ -133,19 +139,20 @@
       return (ValueMap.this.remove(key) != null);
     }
 
-    public Iterator iterator()
+    @Override
+    public Iterator<Map.Entry<Object, Object>> iterator()
     {
-      final Iterator base = _keys.iterator();
-      return new Iterator()
+      final Iterator<PropertyKey> base = _keys.iterator();
+      return new Iterator<Map.Entry<Object, Object>>()
       {
         public boolean hasNext()
         {
           return base.hasNext();
         }
 
-        public Object next()
+        public Map.Entry<Object, Object> next()
         {
-          _lastEntry = new EntryImpl((PropertyKey) base.next());
+          _lastEntry = new EntryImpl(base.next());
           return _lastEntry;
         }
 
@@ -164,10 +171,10 @@
       };
     }
 
-    private Set _keys;
+    private Set<PropertyKey> _keys;
   }
 
-  private class EntryImpl implements Entry
+  private class EntryImpl implements Entry<Object, Object>
   {
     public EntryImpl(PropertyKey key)
     {
@@ -189,6 +196,8 @@
       return put(_key, value);
     }
 
+    @SuppressWarnings("unchecked")
+    @Override
     public boolean equals(Object o)
     {
       if (o == this)
@@ -197,7 +206,7 @@
       if (!(o instanceof Map.Entry))
         return false;
 
-      Map.Entry e = (Map.Entry)o;
+      Map.Entry<Object, Object> e = (Map.Entry<Object, Object>)o;
       Object k1 = getKey();
       Object k2 = e.getKey();
       if (k1 == k2 || (k1 != null && k1.equals(k2)))
@@ -211,6 +220,7 @@
       return false;
     }
     
+    @Override
     public int hashCode()
     {
       Object value = getValue();

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/AddChildComponentChange.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/AddChildComponentChange.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/AddChildComponentChange.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/AddChildComponentChange.java Tue Aug  1 15:00:44 2006
@@ -70,6 +70,8 @@
   /**
    * {@inheritDoc}
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public void changeComponent(UIComponent uiComponent)
   {
     UIComponent child = getComponent();
@@ -78,7 +80,7 @@
       return;
       
     String newChildId = child.getId();
-    List children = uiComponent.getChildren();
+    List<UIComponent> children = uiComponent.getChildren();
     
     //pu: If there were to be a child already with the ID same as the
     //  to-be-added child, remove it and get the new one added.

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/AttributeComponentChange.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/AttributeComponentChange.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/AttributeComponentChange.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/AttributeComponentChange.java Tue Aug  1 15:00:44 2006
@@ -67,6 +67,8 @@
   /**
    * {@inheritDoc}
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public void changeComponent(UIComponent uiComponent)
   {
     uiComponent.getAttributes().put(_attributeName, _attributeValue);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeComponentProxy.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeComponentProxy.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeComponentProxy.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeComponentProxy.java Tue Aug  1 15:00:44 2006
@@ -58,7 +58,7 @@
   public UIComponent createComponent()
   {
     UIComponent uic = null;
-    Class clazz = _getComponentClass();
+    Class<? extends UIComponent> clazz = _getComponentClass();
     if (clazz == null)
     {
       // An error must have already been logged in _getComponentClass();
@@ -67,7 +67,7 @@
 
     try
     {
-      uic = (UIComponent) clazz.newInstance();
+      uic = clazz.newInstance();
       uic.restoreState(FacesContext.getCurrentInstance(), _state);
     }
     catch (InstantiationException ie)
@@ -87,15 +87,16 @@
     return uic;
   }
 
-  private Class _getComponentClass()
+  @SuppressWarnings("unchecked")
+  private Class<? extends UIComponent> _getComponentClass()
   {
-    Class clazz = _class;
+    Class<? extends UIComponent> clazz = _class;
     if (clazz == null)
     {
       try
       {
         ClassLoader cl = Thread.currentThread().getContextClassLoader();
-        clazz = cl.loadClass(_className);
+        clazz = (Class<? extends UIComponent>)cl.loadClass(_className);
         _class = clazz;
       }
       catch (ClassNotFoundException e)
@@ -107,9 +108,10 @@
     return clazz;
   }
 
-  private transient Class _class;
+  private static final TrinidadLogger _LOG =
+    TrinidadLogger.createTrinidadLogger(ChangeComponentProxy.class);
+
+  private transient Class<? extends UIComponent> _class;
   private String _className;
   private Object _state;
-  static private final TrinidadLogger _LOG =
-    TrinidadLogger.createTrinidadLogger(org.apache.myfaces.trinidad.change.ChangeComponentProxy.class);
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeManager.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeManager.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeManager.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeManager.java Tue Aug  1 15:00:44 2006
@@ -57,7 +57,7 @@
   protected static DocumentChange createDocumentChange(
     ComponentChange change)
   {
-    Class changeClass = change.getClass();
+    Class<? extends ComponentChange> changeClass = change.getClass();
 
     Object converterObject = null;
     DocumentChangeFactory converter = null;
@@ -88,7 +88,7 @@
           ClassLoader contextClassLoader =
             Thread.currentThread().getContextClassLoader();
 
-          Class converterClass = contextClassLoader.loadClass(converterName);
+          Class<?> converterClass = contextClassLoader.loadClass(converterName);
           if (DocumentChangeFactory.class.isAssignableFrom(converterClass))
           {
             converter = (DocumentChangeFactory)converterClass.newInstance();
@@ -163,7 +163,7 @@
    *         are associated with the UIComponent.
    *         Returns <code>null<code> if there are no such Changes
    */
-  public abstract Iterator getComponentChanges(
+  public abstract Iterator<ComponentChange> getComponentChanges(
     FacesContext facesContext,
     UIComponent uiComponent);
 
@@ -173,11 +173,12 @@
   * @return An Iterator that can be used to access the collection of component
   *          identifiers. Returns null if there are no such components.
   */
-  public abstract Iterator getComponentIdsWithChanges(
+  public abstract Iterator<String> getComponentIdsWithChanges(
     FacesContext facesContext);
 
   private static class AttributeConverter extends DocumentChangeFactory
   {
+    @Override
     public DocumentChange convert(ComponentChange compChange)
     {
       if (compChange instanceof AttributeComponentChange)
@@ -208,7 +209,9 @@
 
   private static HashMap<String, String> _CLASSNAME_TO_CONVERTER_NAME_MAP =
     new HashMap<String, String>();
-  private static HashMap _CLASS_TO_CONVERTER_MAP = new HashMap();
+  
+  private static HashMap<Class<? extends ComponentChange>, DocumentChangeFactory> _CLASS_TO_CONVERTER_MAP = 
+    new HashMap<Class<? extends ComponentChange>, DocumentChangeFactory>();
 
   static private final TrinidadLogger _LOG = 
      TrinidadLogger.createTrinidadLogger(ChangeManager.class);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeUtils.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeUtils.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ChangeUtils.java Tue Aug  1 15:00:44 2006
@@ -41,14 +41,17 @@
    *  the children for a child with the specified identifier and returns.
    * Returns null if there were to be no such child
    */
+  @SuppressWarnings("unchecked")
   public static UIComponent getChildForId(UIComponent parent, String childId)
   {
     if (parent == null)
       return null;
-    List children = parent.getChildren();
+
     int numChildren = parent.getChildCount();
     if (numChildren == 0)
       return null;
+
+    List children = parent.getChildren();
     UIComponent child;
     for (int i=0; i<numChildren; i++)
     {

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RemoveChildComponentChange.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RemoveChildComponentChange.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RemoveChildComponentChange.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RemoveChildComponentChange.java Tue Aug  1 15:00:44 2006
@@ -58,12 +58,14 @@
   /**
    * {@inheritDoc}
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public void changeComponent(UIComponent uiComponent)
   {
     if (uiComponent.getChildCount() == 0)
       return;
       
-    List children = uiComponent.getChildren();
+    List<UIComponent> children = uiComponent.getChildren();
     children.remove(ChangeUtils.getChildForId(uiComponent, _childId));
   }
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RemoveFacetComponentChange.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RemoveFacetComponentChange.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RemoveFacetComponentChange.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/RemoveFacetComponentChange.java Tue Aug  1 15:00:44 2006
@@ -58,9 +58,11 @@
   /**
    * {@inheritDoc}
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public void changeComponent(UIComponent uiComponent)
   {
-    Map facets = uiComponent.getFacets();
+    Map<String, UIComponent> facets = uiComponent.getFacets();
     facets.remove(_facetName);
   }
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ReorderChildrenComponentChange.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ReorderChildrenComponentChange.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ReorderChildrenComponentChange.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/ReorderChildrenComponentChange.java Tue Aug  1 15:00:44 2006
@@ -18,7 +18,6 @@
 
 import java.util.ArrayList;
 import java.util.Collections;
-import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
@@ -26,7 +25,6 @@
 import javax.faces.component.UIComponent;
 import org.w3c.dom.Node;
 import org.w3c.dom.NamedNodeMap;
-import org.w3c.dom.Attr;
 
 /**
  * Change specialization for re-ordering of children.
@@ -46,7 +44,7 @@
    * @throws IllegalArgumentException if supplied childIds were to be null.
    */
   public ReorderChildrenComponentChange(
-    List childIds
+    List<String> childIds
     )
   {
     if (childIds == null)
@@ -54,13 +52,13 @@
         "Cannot construct a ReorderChange with null childIds.");
   
     // make serializable copy of list        
-    _childIds = Collections.unmodifiableList(new ArrayList(childIds));
+    _childIds = Collections.unmodifiableList(new ArrayList<String>(childIds));
   }
   
   /**
    * Returns an unmodifiable List of the identifiers for the  children.
    */
-  public List getChildIds()
+  public List<String> getChildIds()
   {
     return _childIds;
   }
@@ -76,24 +74,21 @@
    *  preserving the order in which they were added (that is they appear at 
    *  the end).
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public void changeComponent(UIComponent uiComponent)
   {
     int childCount = uiComponent.getChildCount();
-    
     if (childCount == 0)
       return;
  
     // build order map of of current Nodes, keyed by id
-    Map childrenMap = new LinkedHashMap();
-    
-    List children = uiComponent.getChildren();
+    Map<String, UIComponent> childrenMap = new LinkedHashMap<String, UIComponent>();
     
-    Iterator kids = children.iterator();
-
-    while (kids.hasNext())
+    List<UIComponent> children = uiComponent.getChildren();
+    for(UIComponent child : children)
     {
-      UIComponent currChild = (UIComponent)kids.next();
-      childrenMap.put(currChild.getId(), currChild );      
+      childrenMap.put(child.getId(), child);
     }
 
     // remove the children so that we can add them back in
@@ -102,13 +97,9 @@
     //
     // put children back in, in order
     //
-    Iterator childIds = _childIds.iterator();
-    
-    while (childIds.hasNext())
+    for(String currReorderID : _childIds)
     {
-      Object currReorderID = childIds.next();
-      
-      UIComponent currChild = (UIComponent)childrenMap.remove(currReorderID);
+      UIComponent currChild = childrenMap.remove(currReorderID);
       
       if (currChild != null)
       {
@@ -136,7 +127,7 @@
     Node componentNode)
   {
     // build order map of of current Nodes, keyed by id
-    LinkedHashMap currChildrenMap = new LinkedHashMap(13);
+    LinkedHashMap<String, Node> currChildrenMap = new LinkedHashMap<String, Node>(13);
         
     Node currChild = componentNode.getFirstChild();
     
@@ -145,10 +136,10 @@
       int fakeIndex = 0;
       NamedNodeMap attributes = currChild.getAttributes();
       
-      Object currKey = null;
+      String currKey = null;
       if (attributes != null)
       {
-        Node idAttr = (Attr)attributes.getNamedItem("id");
+        Node idAttr = attributes.getNamedItem("id");
         
         if (idAttr != null)
         {
@@ -160,7 +151,7 @@
       if (currKey == null)
       {
         // =-= bts What about insignificant whitespace?
-        currKey = new Integer(fakeIndex++);
+        currKey = new Integer(fakeIndex++).toString();
       }
 
       currChildrenMap.put(currKey, currChild);
@@ -175,14 +166,9 @@
     //
     // put children back in, in order
     //
-    Iterator childIds = _childIds.iterator();
-    
-    while (childIds.hasNext())
+    for(String currReorderID : _childIds)
     {
-      Object currReorderID = childIds.next();
-      
-      currChild = (Node)currChildrenMap.remove(currReorderID);
-      
+      currChild = currChildrenMap.remove(currReorderID);
       if (currChild != null)
       {
         componentNode.appendChild(currChild);
@@ -191,13 +177,10 @@
     
     // add in all of the rest of the children in
     // relative order they originally appeared
-    Iterator restOfChildren = currChildrenMap.entrySet().iterator();
-    
-    while (restOfChildren.hasNext())
+    for(Map.Entry<String, Node> entry : currChildrenMap.entrySet())
     {
-      currChild = (Node)((Map.Entry)restOfChildren.next()).getValue();
-      componentNode.appendChild(currChild);
-    }    
+      componentNode.appendChild(entry.getValue());
+    } 
   }
   
   /** 
@@ -209,5 +192,5 @@
     return false;
   }
 
-  private final List _childIds;
+  private final List<String> _childIds;
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/SetFacetChildComponentChange.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/SetFacetChildComponentChange.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/SetFacetChildComponentChange.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/SetFacetChildComponentChange.java Tue Aug  1 15:00:44 2006
@@ -63,6 +63,8 @@
   /**
    * {@inheritDoc}
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public void changeComponent(UIComponent uiComponent)
   {
     UIComponent facetComponent = getComponent();

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/SetFacetChildDocumentChange.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/SetFacetChildDocumentChange.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/SetFacetChildDocumentChange.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/change/SetFacetChildDocumentChange.java Tue Aug  1 15:00:44 2006
@@ -106,6 +106,7 @@
    * Returns true if adding the DocumentChange should force the JSP Document
    * to reload
    */
+  @Override
   public boolean getForcesDocumentReload()
   {
     return false;

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ChildArrayList.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ChildArrayList.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ChildArrayList.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ChildArrayList.java Tue Aug  1 15:00:44 2006
@@ -19,7 +19,6 @@
 
 import java.util.Collection;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 
@@ -28,15 +27,15 @@
  *
  * @author The Oracle ADF Faces Team
  */
-class ChildArrayList extends ArrayList
+class ChildArrayList extends ArrayList<UIComponent>
 {
   public ChildArrayList(UIComponent parent)
   {
     _parent = parent;
   }
 
-
-  public void add(int index, Object element)
+  @Override
+  public void add(int index, UIComponent element)
   {
     if (element == null)
       throw new NullPointerException();
@@ -44,12 +43,10 @@
     if ((index < 0) || (index > size()))
       throw new IndexOutOfBoundsException("index:"+index+" size:"+size());
 
-    UIComponent child = (UIComponent) element;
-
-    UIComponent oldParent = child.getParent();
+    UIComponent oldParent = element.getParent();
     if (oldParent != null)
     {
-      int adjustedIndex = __removeFromParent(child, index);
+      int adjustedIndex = __removeFromParent(element, index);
       // Only adjust the index when the child is re-added to the same parent
       if (oldParent == _parent)
       {
@@ -57,30 +54,32 @@
       }
     }
 
-    child.setParent(_parent);
-    super.add(index, child);
+    element.setParent(_parent);
+    super.add(index, element);
   }
 
   
-  public boolean add(Object element)
+  @Override
+  public boolean add(UIComponent element)
   {
     add(size(), element);
     return true;
   }
   
-  
-  public boolean addAll(Collection collection)
+  @Override
+  public boolean addAll(Collection<? extends UIComponent> collection)
   {
     return addAll(size(), collection);
   }
 
-  public boolean addAll(int index, Collection collection)
+  @Override
+  public boolean addAll(
+      int index, 
+      Collection<? extends UIComponent> collection)
   {
-    Iterator elements = collection.iterator();
     boolean changed = false;
-    while (elements.hasNext())
+    for(UIComponent element : collection)
     {
-      UIComponent element = (UIComponent) elements.next();
       if (element == null)
         throw new NullPointerException();
 
@@ -91,15 +90,16 @@
     return changed;
   }
 
-  public Object remove(int index)
+  @Override
+  public UIComponent remove(int index)
   {
-    UIComponent child = (UIComponent) get(index);
-    super.remove(index);
+    UIComponent child = super.remove(index);
     child.setParent(null);
 
     return child;
   }
 
+  @Override
   public boolean remove(Object element)
   {
     if (element == null)
@@ -118,40 +118,40 @@
     return false;
   }
   
-  public boolean removeAll(Collection collection)
+  @Override
+  public boolean removeAll(Collection<?> collection)
   {
     boolean result = false;
-    Iterator elements = collection.iterator();
-    while (elements.hasNext())
+    for(Object element : collection)
     {
-      if (remove(elements.next()))
+      if (remove(element))
         result = true;
     }
     
     return result;
   }
 
-  public Object set(int index, Object element)
+  @Override
+  public UIComponent set(int index, UIComponent element)
   {
     if (element == null)
       throw new NullPointerException();
     
-    if (!(element instanceof UIComponent))
-      throw new ClassCastException();
-    
     if ((index < 0) || (index >= size()))
       throw new IndexOutOfBoundsException();
 
-    UIComponent child = (UIComponent) element;
-    UIComponent previous = (UIComponent) get(index);
+    UIComponent child = element;
+    UIComponent previous = get(index);
 
     previous.setParent(null);
     
     child.setParent(_parent);
     super.set(index, element);
+    
     return previous;
   }
 
+  @SuppressWarnings("unchecked")
   static int __removeFromParent(
     UIComponent component,
     int index)
@@ -161,7 +161,7 @@
 
     if (parent.getChildCount() > 0)
     {
-      List children = parent.getChildren();
+      List<UIComponent> children = parent.getChildren();
       int size = children.size();
       for  (int i = 0; i < size; i++)
       {
@@ -175,7 +175,7 @@
       }
     }
     
-    Collection facets = parent.getFacets().values();
+    Collection<UIComponent> facets = parent.getFacets().values();
     if (facets.contains(component))
     {
       facets.remove(component);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ChildLoop.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ChildLoop.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ChildLoop.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ChildLoop.java Tue Aug  1 15:00:44 2006
@@ -14,8 +14,8 @@
 * limitations under the License.
 */
 package org.apache.myfaces.trinidad.component;
+
 import java.util.Collection;
-import java.util.Iterator;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 
@@ -40,17 +40,16 @@
       runAlways(context, child);
   }
   
+  @SuppressWarnings("unchecked")
   public final void runAlways(FacesContext context, UIComponent comp)
   {
     runAlways(context, comp.getChildren());
   }
 
-  public final void runAlways(FacesContext context, Collection kids)
+  public final void runAlways(FacesContext context, Collection<UIComponent> kids)
   {
-    Iterator children = kids.iterator();
-    while (children.hasNext())
+    for(UIComponent child : kids)
     {
-      UIComponent child = (UIComponent) children.next();
       process(context, child);
     }
   }
@@ -69,6 +68,7 @@
   
   static final class Update extends ChildLoop
   {
+    @Override
     protected void process(FacesContext context, UIComponent child)
     {
       child.processUpdates(context);
@@ -77,6 +77,7 @@
 
   static final class Validate extends ChildLoop
   {
+    @Override
     protected void process(FacesContext context, UIComponent child)
     {
       child.processValidators(context);
@@ -85,6 +86,7 @@
 
   static final class Decode extends ChildLoop
   {
+    @Override
     protected void process(FacesContext context, UIComponent child)
     {
       child.processDecodes(context);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacesMessageWrapper.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacesMessageWrapper.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacesMessageWrapper.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacesMessageWrapper.java Tue Aug  1 15:00:44 2006
@@ -34,31 +34,37 @@
     setLabel(label);
   }
 
+  @Override
   public String getDetail()
   {
     return _wrapped.getDetail();
   }
 
+  @Override
   public FacesMessage.Severity getSeverity()
   {
     return _wrapped.getSeverity();
   }
 
+  @Override
   public String getSummary()
   {
     return _wrapped.getSummary();
   }
 
+  @Override
   public void setDetail(String detail)
   {
     _wrapped.setDetail(detail);
   }
 
+  @Override
   public void setSeverity(FacesMessage.Severity severity)
   {
     _wrapped.setSeverity(severity);
   }
 
+  @Override
   public void setSummary(String summary)
   {
     _wrapped.setSummary(summary);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacetHashMap.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacetHashMap.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacetHashMap.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/FacetHashMap.java Tue Aug  1 15:00:44 2006
@@ -17,7 +17,6 @@
 
 import javax.faces.component.UIComponent;
 
-import java.util.Iterator;
 import java.util.Map;
 
 import org.apache.myfaces.trinidad.util.ArrayMap;
@@ -27,7 +26,7 @@
  *
  * @author The Oracle ADF Faces Team
  */
-class FacetHashMap extends ArrayMap
+class FacetHashMap extends ArrayMap<String, UIComponent>
 {
   public FacetHashMap(UIComponent parent)
   {
@@ -35,71 +34,63 @@
     _parent = parent;
   }
 
+  @Override
   public void clear()
   {
-    Iterator values = values().iterator();
-    while (values.hasNext())
+    for(UIComponent value : values())
     {
-      UIComponent value = (UIComponent) values.next();
       value.setParent(null);
     }
 
     super.clear();
   }
   
-  public Object put(Object key, Object value)
+  @Override
+  public UIComponent put(String key, UIComponent value)
   {
     if ((key == null) || (value == null))
     {
       throw new NullPointerException();
     }
 
-    else if (!(key instanceof String) ||
-             !(value instanceof UIComponent))
-    {
-      throw new ClassCastException();
-    }
-
-    UIComponent previous = (UIComponent) super.get(key);
+    UIComponent previous = super.get(key);
     if (previous != null)
     {
       previous.setParent(null);
     }
     
-    UIComponent current = (UIComponent) value;
-    if (current.getParent() != null)
+    if (value.getParent() != null)
     {
-      ChildArrayList.__removeFromParent(current, -1);
+      ChildArrayList.__removeFromParent(value, -1);
     }
 
-    current.setParent(_parent);
+    value.setParent(_parent);
     return (super.put(key, value));
   }
 
-  public void putAll(Map map)
+  @Override
+  public void putAll(Map<? extends String, ? extends UIComponent> map)
   {
     if (map == null)
     {
       throw new NullPointerException();
     }
 
-    Iterator keys = map.keySet().iterator();
-    while (keys.hasNext())
+    for(Map.Entry<? extends String, ? extends UIComponent> entry : map.entrySet())
     {
-      Object key = keys.next();
-      put(key, map.get(key));
+      put(entry.getKey(), entry.getValue());
     }
   }
   
-  public Object remove(Object key)
+  @Override
+  public UIComponent remove(Object key)
   {
-    UIComponent previous = (UIComponent) get(key);
+    UIComponent previous = super.remove(key);
     if (previous != null)
     {
       previous.setParent(null);
     }
     
-    super.remove(key);
     return (previous);
   }
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/HierarchyUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/HierarchyUtils.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/HierarchyUtils.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/HierarchyUtils.java Tue Aug  1 15:00:44 2006
@@ -33,10 +33,11 @@
 public final class HierarchyUtils 
 {
 
+  // FIXME: What is the param type of RowKeySet here?
   static void __handleBroadcast(
-    UIXHierarchy  comp, 
-    FacesEvent    event,
-    RowKeySet       state,
+    UIXHierarchy      comp, 
+    FacesEvent        event,
+    RowKeySet<Object> state,
     MethodBinding disclosureListener) throws AbortProcessingException
   {
   
@@ -45,11 +46,12 @@
     {
       RowDisclosureEvent dEvent = (RowDisclosureEvent) event;
       state.removeAll(dEvent.getRemovedSet());
-      RowKeySet added = dEvent.getAddedSet();
+      RowKeySet<Object> added = dEvent.getAddedSet();
       int size = 0;
       // only do an unbounded expandAll if the number of new nodes is not
       // too large:
-      for(Object key:added)
+      // FIXME: Wouldn't .size() do the work instead of looping 100 times...
+      for(Object key : added)
       {
         if (++size > 100)
           break;
@@ -71,8 +73,8 @@
 
 
   static void __handleEncodeBegin(
-    UIXHierarchy    comp,
-    RowKeySet         set
+    UIXHierarchy      comp,
+    RowKeySet<Object> set
     )
   {
     if (comp.__isFirstRender())
@@ -82,7 +84,8 @@
       Object focusRowKey = comp.getFocusRowKey();
       if ( focusRowKey != null)
       {
-        List focusPath = new ArrayList(comp.getAllAncestorContainerRowKeys(focusRowKey));
+        List<Object> focusPath = 
+          new ArrayList<Object>(comp.getAllAncestorContainerRowKeys(focusRowKey));
         focusPath.add(focusRowKey);
         int size = focusPath.size();
         for ( int i = 0 ; i < size; i++)
@@ -121,11 +124,11 @@
 
 
   static void __iterateOverTree(
-    FacesContext context,
-    PhaseId      phaseId,
-    UIXHierarchy comp,
-    RowKeySet      state,
-    boolean      processChildrenAsStamps
+    FacesContext      context,
+    PhaseId           phaseId,
+    UIXHierarchy      comp,
+    RowKeySet<Object> state,
+    boolean           processChildrenAsStamps
     )
   {
     UIComponent nodeStamp = comp.getFacet("nodeStamp");
@@ -174,8 +177,8 @@
     
     if (focusKey != null )  
     {
-      List focusPath = component.getAllAncestorContainerRowKeys(focusKey);
-      focusPath = new ArrayList(focusPath);
+      List<Object> focusPath = component.getAllAncestorContainerRowKeys(focusKey);
+      focusPath = new ArrayList<Object>(focusPath);
       focusPath.add(focusKey);
       int focusSize =  focusPath.size();
       if ( focusSize > startDepth )

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/StampState.java Tue Aug  1 15:00:44 2006
@@ -37,10 +37,10 @@
  */
 final class StampState implements Externalizable
 {
-
-
+  @SuppressWarnings("unchecked")
   public StampState()
   {
+    _rows = Collections.EMPTY_MAP;
   }
 
   /**
@@ -52,10 +52,10 @@
   {
     if (!_rows.isEmpty())
     {
-      Iterator iter = _rows.keySet().iterator();
+      Iterator<DualKey> iter = _rows.keySet().iterator();
       while(iter.hasNext())
       {
-        DualKey dk = (DualKey) iter.next();
+        DualKey dk = iter.next();
         if (_eq(dk._key1, skipCurrencyObj))
           continue;
         iter.remove();
@@ -68,7 +68,7 @@
     if (_rows == Collections.EMPTY_MAP)
     {
       // =-=AEW Better default sizes
-      _rows = new HashMap(109);
+      _rows = new HashMap<DualKey, Object>(109);
     }
 
     DualKey dk = new DualKey(currencyObj, key);
@@ -119,17 +119,18 @@
   /**
    * save the stamp state of the children of the given column in the given table.
    */
+  @SuppressWarnings("unchecked")
   public static Object saveChildStampState(
     FacesContext context,
     UIComponent column,
     UIXCollection table)
   {
-    List kids = column.getChildren();
+    List<UIComponent> kids = column.getChildren();
     int sz = kids.size();
     Object[] state = new Object[sz];
     for(int i=0; i<sz; i++)
     {
-      state[i] = table.saveStampState(context, (UIComponent) kids.get(i));
+      state[i] = table.saveStampState(context, kids.get(i));
     }
     return state;
   }
@@ -137,17 +138,18 @@
   /**
    * restore the stamp state of the children of the given column in the given table.
    */
+  @SuppressWarnings("unchecked")
   public static void restoreChildStampState(
     FacesContext context,
     UIComponent column,
     UIXCollection table,
     Object stampState)
   {
-    List kids = column.getChildren();
+    List<UIComponent> kids = column.getChildren();
     Object[] state = (Object[]) stampState;
     for(int i=0; i<state.length; i++)
     {
-      table.restoreStampState(context, (UIComponent) kids.get(i), state[i]);
+      table.restoreStampState(context, kids.get(i), state[i]);
     }
   }
 
@@ -161,15 +163,13 @@
     if (_rows.isEmpty())
       return;
 
-    HashMap map = new HashMap(_rows.size());
+    HashMap<DualKey, Object> map = new HashMap<DualKey, Object>(_rows.size());
     map.putAll(_rows);
 
     if (_LOG.isFinest())
     {
-      Iterator entries = map.entrySet().iterator();
-      while (entries.hasNext())
+      for(Map.Entry<DualKey, Object> entry : map.entrySet())
       {
-        Map.Entry entry = (Map.Entry) entries.next();
         _LOG.finest("Saving " + entry.getKey() + ", " + entry.getValue());
       }
     }
@@ -177,20 +177,19 @@
     out.writeObject(map);
   }
 
+  @SuppressWarnings("unchecked")
   public void readExternal(ObjectInput in)
     throws IOException, ClassNotFoundException
   {
     int size = in.readInt();
 
     if (size > 0)
-    _rows = (Map) in.readObject();
+    _rows = (Map<DualKey, Object>) in.readObject();
 
     if (_LOG.isFinest())
     {
-      Iterator entries = _rows.entrySet().iterator();
-      while (entries.hasNext())
+      for(Map.Entry<DualKey, Object> entry : _rows.entrySet())
       {
-        Map.Entry entry = (Map.Entry) entries.next();
         _LOG.finest("Restoring " + entry.getKey() + ", " + entry.getValue());
       }
     }
@@ -235,26 +234,35 @@
     {
     }
 
+    @Override
     public void saveRowState(UIComponent child)
     {
       _disclosed = ((UIXShowDetail) child).isDisclosed();
     }
 
+    @Override
     public void restoreRowState(UIComponent child)
     {
       ((UIXShowDetail) child).setDisclosed(_disclosed);
     }
 
+    @Override
     public boolean isNull()
     {
       return !_disclosed;
     }
 
+    @Override
     public String toString()
     {
       return "SDState[disclosed=" + _disclosed + "]";
     }
 
+    /**
+     * 
+     */
+    private static final long serialVersionUID = -8605916495935317932L;
+
     private boolean _disclosed;
   }
 
@@ -264,16 +272,19 @@
     {
     }
 
+    @Override
     public void saveRowState(UIComponent child)
     {
       _state = ((UIXCollection) child).__getMyStampState();
     }
 
+    @Override
     public void restoreRowState(UIComponent child)
     {
       ((UIXCollection) child).__setMyStampState(_state);
     }
 
+    @Override
     public boolean isNull()
     {
       return _state == null;
@@ -289,6 +300,7 @@
       _valid = true;
     }
 
+    @Override
     public void saveRowState(UIComponent child)
     {
       assert _assertIsStampCorrect(child);
@@ -300,6 +312,7 @@
       _valid = evh.isValid();
     }
 
+    @Override
     public void restoreRowState(UIComponent child)
     {
       assert _assertIsStampCorrect(child);
@@ -313,12 +326,14 @@
       assert _assertStampHonoursState(evh);
     }
 
+    @Override
     public boolean isNull()
     {
       return (_valid && (!_localSet) && (_submitted == null));
     }
 
 
+    @Override
     public String toString()
     {
       return "EVHState[value=" + _local + ",submitted=" + _submitted + "]";
@@ -373,6 +388,7 @@
       _hash = _hash(key1) + _hash(key2);
     }
 
+    @Override
     public boolean equals(Object other)
     {
       if (other == this)
@@ -388,11 +404,13 @@
       return false;
     }
 
+    @Override
     public int hashCode()
     {
       return _hash;
     }
 
+    @Override
     public String toString()
     {
       return "<"+_key1+","+_key2+">";
@@ -407,7 +425,8 @@
     private final int _hash;
   }
 
-  private Map _rows = Collections.EMPTY_MAP;
+  private static final TrinidadLogger _LOG =
+     TrinidadLogger.createTrinidadLogger(StampState.class);
 
-  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(StampState.class);
+  private Map<DualKey, Object> _rows;
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TableUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TableUtils.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TableUtils.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TableUtils.java Tue Aug  1 15:00:44 2006
@@ -87,9 +87,10 @@
    * @return any old value that was bound to the EL variable, or null
    * if there was no old value.
    */
+  @SuppressWarnings("unchecked")
   public static Object setupELVariable(FacesContext context, String name, Object value)
   {
-    Map requestMap = context.getExternalContext().getRequestMap();
+    Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
     if (value == null)
       return requestMap.remove(name);
     else
@@ -108,7 +109,10 @@
    * @param model this tree model must have its path pointing to a particular 
    * node which must be a container.
    */
-  static void __doSafeExpandAll(TreeModel model, RowKeySet state, int maxSize)
+  static void __doSafeExpandAll(
+      TreeModel model, 
+      RowKeySet<Object> state, 
+      int maxSize)
   {
     int size = _getSizeOfTree(model, maxSize);
     if ((size < 0) || (size > maxSize))
@@ -209,6 +213,7 @@
    * @param skipFacet the name of any facet that should not be processed 
    * at this time.
    */
+  @SuppressWarnings("unchecked")
   static void __processFacets(
     FacesContext context,
     final UIXCollection table,
@@ -216,13 +221,14 @@
     final PhaseId phaseId,
     String skipFacet)
   {
-    Map facets = component.getFacets();
+    Map<String, UIComponent> facets = component.getFacets();
     final UIComponent skip = (skipFacet != null)
       ? (UIComponent) facets.get(skipFacet)
       : null;
                                            
     new ChildLoop()
     {
+      @Override
       protected void process(FacesContext context, UIComponent facet)
       {
         if (facet != skip)
@@ -243,6 +249,7 @@
   {
     new ChildLoop()
     {
+      @Override
       protected void process(FacesContext context, UIComponent child)
       {
         if (child instanceof UIXColumn)
@@ -266,6 +273,7 @@
   {
     new ChildLoop()
     {
+      @Override
       protected void process(FacesContext context, UIComponent child)
       {
         table.processComponent(context, child, phaseId);
@@ -276,6 +284,7 @@
   /**
    * Process all the children of the given table
    */
+  @SuppressWarnings("unchecked")
   static void __processChildren(
     FacesContext context,
     final UIXCollection comp,

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TreeState.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TreeState.java?rev=427760&r1=427759&r2=427760&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TreeState.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/TreeState.java Tue Aug  1 15:00:44 2006
@@ -22,9 +22,9 @@
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 import org.apache.myfaces.trinidad.logging.TrinidadLogger;
 
@@ -49,6 +49,7 @@
     return _empty;
   }
 
+  @SuppressWarnings("unchecked")
   public void restoreState(FacesContext context, UIXComponentBase component)
   {
     component.restoreState(context, _state);
@@ -153,6 +154,7 @@
     }
   }
 
+  @SuppressWarnings("unchecked")
   public void saveState(FacesContext context, UIXComponentBase component)
   {
     // Save the component's state
@@ -206,12 +208,11 @@
     else
     {
       _facets = new Object[facetCount * 2];
-      Iterator facets = component.getFacets().entrySet().iterator();
       int i = 0;
-      while (facets.hasNext())
+      Set<Map.Entry<String, UIComponent>> entries = component.getFacets().entrySet();
+      for(Map.Entry<String, UIComponent> entry : entries)
       {
-        Map.Entry entry = (Map.Entry) facets.next();
-        UIComponent facet = (UIComponent) entry.getValue();
+        UIComponent facet = entry.getValue();
 
         // Just skip over transient facets
         if (facet.isTransient())
@@ -255,10 +256,10 @@
   }
 
 
+  private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(TreeState.class);
+
   private Object[] _facets;
   private Object[] _children;
   private Object _state;
   private boolean _empty;
-
-  static private final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(TreeState.class);
 }



Mime
View raw message