incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r431848 [1/6] - in /incubator/adffaces/trunk/trinidad: ./ trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ trinidad-api/src/main/java/org/apache/myfaces...
Date Wed, 16 Aug 2006 07:00:19 GMT
Author: awiner
Date: Wed Aug 16 00:00:16 2006
New Revision: 431848

URL: http://svn.apache.org/viewvc?rev=431848&view=rev
Log:
Check in final patch from Simon on ADFFACES-72

Modified:
    incubator/adffaces/trunk/trinidad/pom.xml
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXComponentRefTemplate.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXPageTemplate.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTableTemplate.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/TypeRepository.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/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/UIXCollection.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/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/model/CollectionModel.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/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/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/XMLMenuModel.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/util/ListFromCollection.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/test/java/org/apache/myfaces/trinidad/component/UIXTableTest.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/test/java/org/apache/myfaces/trinidad/model/RowKeySetImplTest.java
    incubator/adffaces/trunk/trinidad/trinidad-api/src/test/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImplTest.java
    incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ComponentTree.java
    incubator/adffaces/trunk/trinidad/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/TableBean.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/agent/AgentFactoryImpl.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/change/BaseChangeManager.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/GenericConverterFactory.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/convert/SqlConverter.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/el/FormatterMap.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/el/HelpProvider.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/image/cache/MapCacheEntry.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/GroupNode.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/ItemNode.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuContentHandlerImpl.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuNode.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/menu/MenuUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/metadata/RegionMetadata.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/DialogRequest.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/desktop/TreeTableRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/SimpleInputNumberSpinboxRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/TableRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableRenderingContext.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectManyRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TableSelectOneRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TreeNodeColumnRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TreeTableRenderingContext.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/core/xhtml/table/TreeUtils.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/uix/NavigationTreeRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/uix/PageRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/uix/SelectItemSupport.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/uix/SelectManyShuttleRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/renderkit/uix/TreeRenderer.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/share/nls/MutableLocaleContext.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/skin/SkinExtension.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/ColorSchemeNode.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/CompoundPropertyNode.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleNode.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocument.java
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNode.java

Modified: incubator/adffaces/trunk/trinidad/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/pom.xml?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/pom.xml (original)
+++ incubator/adffaces/trunk/trinidad/pom.xml Wed Aug 16 00:00:16 2006
@@ -215,6 +215,7 @@
           <configuration>
             <source>1.5</source>
             <target>1.5</target>
+            <showWarnings>true</showWarnings>
           </configuration>
         </plugin>
 
@@ -428,4 +429,4 @@
 -->
   </distributionManagement>
 
-</project>
\ No newline at end of file
+</project>

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXComponentRefTemplate.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXComponentRefTemplate.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXComponentRefTemplate.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXComponentRefTemplate.java Wed Aug 16 00:00:16 2006
@@ -221,10 +221,9 @@
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public Set<Map.Entry<Object, Object>> entrySet()
     {
-      return Collections.EMPTY_SET;
+      return Collections.emptySet();
     }
   }
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXPageTemplate.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXPageTemplate.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXPageTemplate.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXPageTemplate.java Wed Aug 16 00:00:16 2006
@@ -80,6 +80,7 @@
   }
  
   @Override
+  @SuppressWarnings("unchecked")
   protected void processFacetsAndChildren(
     FacesContext context,
     PhaseId phaseId)
@@ -98,15 +99,15 @@
     // process the children
     TableUtils.__processChildren(context, this, phaseId);
 
-    Map facets = getFacets();
-    Iterator facetKeys = facets.keySet().iterator();
+    Map<String, UIComponent> facets = getFacets();
+    Iterator<String> facetKeys = facets.keySet().iterator();
 
     while(facetKeys.hasNext())
     {
-      Object facetKey = facetKeys.next();
+      String facetKey = facetKeys.next();
       if (!"nodeStamp".equals(facetKey))
       {
-        processComponent(context, (UIComponent)facets.get(facetKey), phaseId);
+        processComponent(context, facets.get(facetKey), phaseId);
       }
     }
         

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTableTemplate.java Wed Aug 16 00:00:16 2006
@@ -154,6 +154,7 @@
   }
 
 	@Override
+	@SuppressWarnings("unchecked")
   public void restoreState(FacesContext context, Object state)
   {
     Object[] array = (Object[]) state;
@@ -179,7 +180,7 @@
   public Object getSelectedRowData() 
   {
     RowKeySet state = getSelectedRowKeys();
-    Iterator keys = state.iterator();
+    Iterator<Object> keys = state.iterator();
     if (keys.hasNext()) 
     {
       Object key = keys.next();
@@ -311,10 +312,11 @@
    * @param stampState the internal state is obtained from this object.
    */
   @Override
+  @SuppressWarnings("unchecked")
   void __setMyStampState(Object stampState)
   {
     Object[] state = (Object[]) stampState;
-    _sortCriteria = (List) state[0];
+    _sortCriteria = (List<SortCriterion>) state[0];
     super.__setMyStampState(state[1]);
     setFirst(((Integer) state[2]).intValue());
     setShowAll(Boolean.TRUE == state[3]);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTableTemplate.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTableTemplate.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTableTemplate.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java-templates/org/apache/myfaces/trinidad/component/UIXTreeTableTemplate.java Wed Aug 16 00:00:16 2006
@@ -108,7 +108,8 @@
     // this is because "first", "rows" and "rowCount" applies to the container
     // element and not the current element:
     Object container = _getContainerPath();
-    if (_firstMap == Collections.EMPTY_MAP)
+    Map<Object, Integer> comparant = Collections.emptyMap();
+    if (_firstMap == comparant)
       _firstMap = new HashMap<Object, Integer>(3);
 
     if (index <= 0)
@@ -163,7 +164,7 @@
     super.restoreState(context, array[0]);
     _firstMap = (Map<Object, Integer>) array[1];
     if (_firstMap == null)
-      _firstMap = Collections.EMPTY_MAP;
+      _firstMap = Collections.emptyMap();
   }
 
   @Override
@@ -202,8 +203,8 @@
    * the nodeStamp stamp (if any).
    * @todo cache the result.
    */
-  @SuppressWarnings("unchecked")
   @Override
+  @SuppressWarnings("unchecked")
   protected final List getStamps()
   {
     List<UIComponent> children = getChildren();
@@ -333,5 +334,5 @@
     return parentKey;
   }
 
-  private Map<Object, Integer> _firstMap = Collections.EMPTY_MAP;
+  private Map<Object, Integer> _firstMap = Collections.emptyMap();
 }

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=431848&r1=431847&r2=431848&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 Wed Aug 16 00:00:16 2006
@@ -227,7 +227,7 @@
 
     List<Object> l = (List<Object>) getLocalPropertyImpl(listKey);
     if (l == null)
-      return Collections.EMPTY_LIST.iterator();
+      return Collections.emptyList().iterator();
 
     return l.iterator();
   }
@@ -270,12 +270,10 @@
     }
   }
 
-
-  @SuppressWarnings("unchecked")
   final public Set<PropertyKey> keySet()
   {
     if (_properties == null)
-      return Collections.EMPTY_SET;
+      return Collections.emptySet();
 
     return _properties.keySet();
   }
@@ -284,7 +282,7 @@
   final public Set<PropertyKey> bindingKeySet()
   {
     if (_bindings == null)
-      return Collections.EMPTY_SET;
+      return Collections.emptySet();
 
     return _bindings.keySet();
   }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/TypeRepository.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/TypeRepository.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/TypeRepository.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/TypeRepository.java Wed Aug 16 00:00:16 2006
@@ -41,21 +41,21 @@
     // non-issue at least given the intended use of this class.
     synchronized (_repos)
     {
-      //      Map<String, Map<String, FacesBean.Type>> rkMap = _repos.get(renderKitId);
-      Map rkMap = (Map) _repos.get(renderKitId);
+      Map<String, Map<String, FacesBean.Type>> rkMap = _repos.get(renderKitId);
+      //Map rkMap = (Map) _repos.get(renderKitId);
       if (rkMap == null)
       {
-        //        rkMap = new HashMap<String, Map<String, FacesBean.Type>>();
-        rkMap = new HashMap();
+        rkMap = new HashMap<String, Map<String, FacesBean.Type>>();
+        //rkMap = new HashMap();
         _repos.put(renderKitId, rkMap);
       }
 
-      Map familyMap = (Map) rkMap.get(componentFamily);
-      //      Map<String, FacesBean.Type> familyMap = rkMap.get(componentFamily);
+      //Map familyMap = (Map) rkMap.get(componentFamily);
+      Map<String, FacesBean.Type> familyMap = rkMap.get(componentFamily);
       if (familyMap == null)
       {
-        familyMap = new HashMap();
-        //familyMap = new HashMap<String, FacesBean.Type>();
+        //familyMap = new HashMap();
+        familyMap = new HashMap<String, FacesBean.Type>();
         rkMap.put(componentFamily, familyMap);
       }
       
@@ -72,23 +72,26 @@
 
     synchronized (_repos)
     {
-      //      Map<String, Map<String, FacesBean.Type>> rkMap = _repos.get(renderKitId);
-      Map rkMap = (Map) _repos.get(renderKitId);
+      Map<String, Map<String, FacesBean.Type>> rkMap = _repos.get(renderKitId);
+      //Map rkMap = (Map) _repos.get(renderKitId);
       if (rkMap == null)
         return null;
 
-      //      Map<String, FacesBean.Type> familyMap = rkMap.get(componentFamily);
-      Map familyMap = (Map) rkMap.get(componentFamily);
+      Map<String, FacesBean.Type> familyMap = rkMap.get(componentFamily);
+      //Map familyMap = (Map) rkMap.get(componentFamily);
       if (familyMap == null)
         return null;
       
-      return (FacesBean.Type) familyMap.get(rendererType);
+      return familyMap.get(rendererType);
     }
   }
 
   // "qdox" doesn't support JDK 1.5 syntax like this.  Hence, all
   // the commented-out code...
-  //  static private Map<String, Map<String, Map<String, FacesBean.Type>>>
-  //    _repos = new HashMap<String, Map<String, Map<String, FacesBean.Type>>>();
-  static private Map _repos = new HashMap();
+  // -= Simon Lessard =-
+  // Attempted to switch to JDK 5 on 2006-08-11. We'll see if qdox works fine 
+  // with it now.
+  static private Map<String, Map<String, Map<String, FacesBean.Type>>>
+      _repos = new HashMap<String, Map<String, Map<String, FacesBean.Type>>>();
+  //static private Map _repos = new HashMap();
 }

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=431848&r1=431847&r2=431848&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 Wed Aug 16 00:00:16 2006
@@ -135,13 +135,12 @@
     map.putAll(t);
   }
 
-  @SuppressWarnings("unchecked")
   @Override
   public Set<Map.Entry<PropertyKey, Object>> entrySet()
   {
     Map<PropertyKey, Object> map = getPropertyMap(false);
     if ((map == null) || map.isEmpty())
-      return Collections.EMPTY_SET;
+      return Collections.emptySet();
 
     return map.entrySet();
   }
@@ -149,25 +148,22 @@
   /**
    * @todo Optimize to take advantage of flags.
    */
-  @SuppressWarnings("unchecked")
   @Override
   public Set<PropertyKey> keySet()
   {
     Map<PropertyKey, Object> map = getPropertyMap(false);
     if ((map == null) || map.isEmpty())
-      return Collections.EMPTY_SET;
+      return Collections.emptySet();
 
     return map.keySet();
   }
 
-
-  @SuppressWarnings("unchecked")
   @Override
   public Collection<Object> values()
   {
     Map<PropertyKey, Object> map = getPropertyMap(false);
     if ((map == null) || map.isEmpty())
-      return Collections.EMPTY_SET;
+      return Collections.emptySet();
 
     return map.values();
   }

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=431848&r1=431847&r2=431848&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 Wed Aug 16 00:00:16 2006
@@ -32,12 +32,10 @@
  */
 public final class HierarchyUtils 
 {
-
-  // FIXME: What is the param type of RowKeySet here?
   static void __handleBroadcast(
-    UIXHierarchy      comp, 
-    FacesEvent        event,
-    RowKeySet<Object> state,
+    UIXHierarchy  comp, 
+    FacesEvent    event,
+    RowKeySet     state,
     MethodBinding disclosureListener) throws AbortProcessingException
   {
   
@@ -46,7 +44,7 @@
     {
       RowDisclosureEvent dEvent = (RowDisclosureEvent) event;
       state.removeAll(dEvent.getRemovedSet());
-      RowKeySet<Object> added = dEvent.getAddedSet();
+      RowKeySet added = dEvent.getAddedSet();
       int size = 0;
       // only do an unbounded expandAll if the number of new nodes is not
       // too large:
@@ -73,8 +71,8 @@
 
 
   static void __handleEncodeBegin(
-    UIXHierarchy      comp,
-    RowKeySet<Object> set
+    UIXHierarchy comp,
+    RowKeySet    set
     )
   {
     if (comp.__isFirstRender())
@@ -124,11 +122,11 @@
 
 
   static void __iterateOverTree(
-    FacesContext      context,
-    PhaseId           phaseId,
-    UIXHierarchy      comp,
-    RowKeySet<Object> state,
-    boolean           processChildrenAsStamps
+    FacesContext context,
+    PhaseId      phaseId,
+    UIXHierarchy comp,
+    RowKeySet    state,
+    boolean      processChildrenAsStamps
     )
   {
     UIComponent nodeStamp = comp.getFacet("nodeStamp");

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=431848&r1=431847&r2=431848&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 Wed Aug 16 00:00:16 2006
@@ -37,10 +37,9 @@
  */
 final class StampState implements Externalizable
 {
-  @SuppressWarnings("unchecked")
   public StampState()
   {
-    _rows = Collections.EMPTY_MAP;
+    _rows = Collections.emptyMap();
   }
 
   /**
@@ -65,7 +64,8 @@
 
   public void put(Object currencyObj, String key, Object value)
   {
-    if (_rows == Collections.EMPTY_MAP)
+    Map<DualKey, Object> comparant = Collections.emptyMap();
+    if (_rows == comparant)
     {
       // =-=AEW Better default sizes
       _rows = new HashMap<DualKey, Object>(109);

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=431848&r1=431847&r2=431848&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 Wed Aug 16 00:00:16 2006
@@ -111,8 +111,8 @@
    */
   static void __doSafeExpandAll(
       TreeModel model, 
-      RowKeySet<Object> state, 
-      int maxSize)
+      RowKeySet state, 
+      int       maxSize)
   {
     int size = _getSizeOfTree(model, maxSize);
     if ((size < 0) || (size > maxSize))

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXCollection.java Wed Aug 16 00:00:16 2006
@@ -946,11 +946,10 @@
         return null;
       }
 
-      @SuppressWarnings("unchecked")
       @Override
       public Set<Map.Entry<String, Object>> entrySet()
       {
-        return Collections.EMPTY_SET;
+        return Collections.emptySet();
       }
     };
   }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/UIXHierarchy.java Wed Aug 16 00:00:16 2006
@@ -182,7 +182,6 @@
     return model;
   } 
   
-  @SuppressWarnings("unchecked")
   @Override
   protected List<UIComponent> getStamps()
   {
@@ -190,7 +189,7 @@
     if (nodeStamp != null)
       return Collections.singletonList(nodeStamp);
     else
-      return Collections.EMPTY_LIST;
+      return Collections.emptyList();
   }  
 
   abstract public Object getFocusRowKey();

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/ReturnEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/ReturnEvent.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/ReturnEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/ReturnEvent.java Wed Aug 16 00:00:16 2006
@@ -42,7 +42,6 @@
     this(source, returnValue, null);
   }
 
-  @SuppressWarnings("unchecked")
   public ReturnEvent(
       UIComponent source, 
       Object returnValue, 
@@ -54,7 +53,7 @@
     // Useless and expensive instanciation 
     //_returnParams = new HashMap<Object, Object>();
     if (returnParams == null)
-      _returnParams = Collections.EMPTY_MAP;
+      _returnParams = Collections.emptyMap();
     else
       _returnParams = new HashMap<Object, Object>(returnParams);
   }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowDisclosureEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowDisclosureEvent.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowDisclosureEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowDisclosureEvent.java Wed Aug 16 00:00:16 2006
@@ -35,8 +35,8 @@
    */
   public RowDisclosureEvent(
       UIComponent source, 
-      RowKeySet<Object> collapsed, 
-      RowKeySet<Object> expanded)
+      RowKeySet   collapsed, 
+      RowKeySet   expanded)
   {
     super(source, collapsed, expanded);
   }
@@ -47,8 +47,8 @@
    * @param newSet the set of rowKeys after any changes.
    */
   public RowDisclosureEvent(
-      RowKeySet<Object> oldSet, 
-      RowKeySet<Object> newSet, 
+      RowKeySet   oldSet, 
+      RowKeySet   newSet, 
       UIComponent source)
   {
     super(oldSet, newSet, source);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowKeySetChangeEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowKeySetChangeEvent.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowKeySetChangeEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/RowKeySetChangeEvent.java Wed Aug 16 00:00:16 2006
@@ -33,9 +33,9 @@
    */
   // FIXME: What is the parametrized type inside RowKeySet?
   public RowKeySetChangeEvent(
-      UIComponent  source, 
-      RowKeySet<Object> removedSet,
-      RowKeySet<Object> addedSet)
+      UIComponent source, 
+      RowKeySet   removedSet,
+      RowKeySet   addedSet)
   {
     this(source, removedSet, addedSet, false);
   }
@@ -48,9 +48,9 @@
    */
   // FIXME: What is the parametrized type inside RowKeySet?
   public RowKeySetChangeEvent(
-      RowKeySet<Object> oldSet,
-      RowKeySet<Object> newSet,
-      UIComponent  source)
+      RowKeySet   oldSet,
+      RowKeySet   newSet,
+      UIComponent source)
   {
     // "oldSet" is very often the actual instance-on-the-component.
     // so make sure that we clone this object, so that subsequent mutations of
@@ -62,10 +62,10 @@
 
   // FIXME: What is the parametrized type inside RowKeySet?
   private RowKeySetChangeEvent(
-      UIComponent       source,
-      RowKeySet<Object> oldRemoved,
-      RowKeySet<Object> newAdded,
-      boolean           needsDiff)
+      UIComponent source,
+      RowKeySet   oldRemoved,
+      RowKeySet   newAdded,
+      boolean     needsDiff)
                                
   {
     super(source);
@@ -77,7 +77,7 @@
   /**
    * Gets the Set of keys that have just been added.
    */
-  public RowKeySet<Object> getAddedSet()
+  public RowKeySet getAddedSet()
   {
     _diff();
     return _newAdded;
@@ -86,7 +86,7 @@
   /**
    * Gets the Set of keys that have just been removed.
    */
-  public RowKeySet<Object> getRemovedSet()
+  public RowKeySet getRemovedSet()
   {
     _diff();
     return _oldRemoved;
@@ -96,9 +96,9 @@
   {
     if (_needsDiff)
     {
-      RowKeySet<Object> removed = _oldRemoved.clone();
+      RowKeySet removed = _oldRemoved.clone();
       removed.removeAll(_newAdded);
-      RowKeySet<Object> added = _newAdded.clone();
+      RowKeySet added = _newAdded.clone();
       added.removeAll(_oldRemoved);
 
       _needsDiff = false;
@@ -109,7 +109,7 @@
   
   // set1 - oldSet or removed elements
   // set2 = newSet or added elements
-  private RowKeySet<Object> _oldRemoved;
-  private RowKeySet<Object> _newAdded;
+  private RowKeySet _oldRemoved;
+  private RowKeySet _newAdded;
   private boolean _needsDiff;
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/SelectionEvent.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/SelectionEvent.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/SelectionEvent.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/event/SelectionEvent.java Wed Aug 16 00:00:16 2006
@@ -33,9 +33,9 @@
    */
   // FIXME: What is the parametrized type inside RowKeySet?
   public SelectionEvent(
-      UIComponent       source, 
-      RowKeySet<Object> unselected, 
-      RowKeySet<Object> selected)
+      UIComponent source, 
+      RowKeySet   unselected, 
+      RowKeySet   selected)
   {
     super(source, unselected, selected);
   }
@@ -46,9 +46,9 @@
    * @param newSet the set of rowKeys after any changes.
    */
   public SelectionEvent(
-      RowKeySet<Object> oldSet, 
-      RowKeySet<Object> newSet, 
-      UIComponent       source)
+      RowKeySet   oldSet, 
+      RowKeySet   newSet, 
+      UIComponent source)
   {
     super(oldSet, newSet, source);
   }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/CollectionModel.java Wed Aug 16 00:00:16 2006
@@ -111,10 +111,9 @@
    * An empty list is returned if this collection is not sorted.
    * @see SortCriterion
    */
-  @SuppressWarnings("unchecked")
   public List<SortCriterion> getSortCriteria()
   {
-    return Collections.EMPTY_LIST;
+    return Collections.emptyList();
   }
 
   /**

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ModelUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ModelUtils.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ModelUtils.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/ModelUtils.java Wed Aug 16 00:00:16 2006
@@ -241,7 +241,7 @@
 
     if (value == null)
     {
-      return new ListDataModel(Collections.EMPTY_LIST);
+      return new ListDataModel(Collections.emptyList());
     }
     else if (value instanceof List)
       return new ListDataModel((List) value);

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/PathHelper.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/PathHelper.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/PathHelper.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/PathHelper.java Wed Aug 16 00:00:16 2006
@@ -23,10 +23,9 @@
  */
 class PathHelper 
 {
-  @SuppressWarnings("unchecked")
   protected PathHelper()
   {
-    _path = Collections.EMPTY_LIST;
+    _path = Collections.emptyList();
     _rowKey = null;
   }
   
@@ -88,7 +87,6 @@
    * Sets the path.
    * @param path a List with each element a rowKey String
    */
-  @SuppressWarnings("unchecked")
   public final void setPath(List<String> path)
   {
     int sz = (path==null) ? 0 : path.size();
@@ -107,7 +105,7 @@
     }
     else
     {
-      _path = Collections.EMPTY_LIST;
+      _path = Collections.emptyList();
       setRowKey(null);
     }
   }
@@ -143,7 +141,8 @@
     Object parentData = getLastPathData();
     Object data = pushPath(parentData, _rowKey);
 
-    if (_path == Collections.EMPTY_LIST)
+    List<PathElement> comparant = Collections.emptyList();
+    if (_path == comparant)
       _path = new ArrayList<PathElement>(5);
 
     _path.add(new PathHelper.PathElement(_rowKey, data));

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySet.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySet.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySet.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySet.java Wed Aug 16 00:00:16 2006
@@ -33,11 +33,7 @@
  * compute. Use the {@link #getSize()} method on this class for an inexpensive size.
  * @author The Oracle ADF Faces Team
  */
-// -= Simon Lessard =-
-// TODO: Since RowKeySet is used by so many components internally,
-//       I believe we shouldn't parametrize it. I would rather see 
-//       public abstract class RowKeySet extends AbstractSet<Object> implements Cloneable
-public abstract class RowKeySet<E> extends AbstractSet<E> implements Cloneable
+public abstract class RowKeySet extends AbstractSet<Object> implements Cloneable
 {
   public RowKeySet()
   {
@@ -71,7 +67,7 @@
    * it otherwise.
    * @return true if the row is now added. false otherwise.
    */
-  public boolean invert(E rowKey)
+  public boolean invert(Object rowKey)
   {
     // doing "add" followed by an optional "remove" is faster than switching on
     // "contains"; the latter does two hashtable lookups all the time,
@@ -93,8 +89,7 @@
   @SuppressWarnings("unchecked")
   public final boolean invert()
   {
-    E rowkey = (E) getCollectionModel().getRowKey();
-    return invert(rowkey);
+    return invert(getCollectionModel().getRowKey());
   }
 
   /**
@@ -128,8 +123,7 @@
   @SuppressWarnings("unchecked")
   public final boolean add()
   {
-    E rowkey = (E) getCollectionModel().getRowKey();
-    return add(rowkey);
+    return add(getCollectionModel().getRowKey());
   }
   
   /**
@@ -198,11 +192,11 @@
    */
   @SuppressWarnings("unchecked")
   @Override
-  public RowKeySet<E> clone()
+  public RowKeySet clone()
   {
     try
     {
-      return (RowKeySet<E>) super.clone();
+      return (RowKeySet) super.clone();
     }
     catch (CloneNotSupportedException e)
     {

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetImpl.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetImpl.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetImpl.java Wed Aug 16 00:00:16 2006
@@ -40,7 +40,7 @@
  * invertAll.
  * @author The Oracle ADF Faces Team
  */
-public final class RowKeySetImpl<E> extends RowKeySet<E> implements Externalizable
+public final class RowKeySetImpl extends RowKeySet implements Externalizable
 {
   /**
    * Creates an initially empty RowKeySet.
@@ -54,11 +54,10 @@
    * Creates a new RowKeySet.
    * @param addAll whether to add every rowKey to this set.
    */
-  @SuppressWarnings("unchecked")
   public RowKeySetImpl(boolean addAll)
   {
     _default = addAll;
-    _set = Collections.EMPTY_SET;
+    _set = Collections.emptySet();
     _model = null;
   }
 
@@ -77,7 +76,7 @@
    * @return true if this set changed
    */
   @Override
-  public boolean add(E rowKey)
+  public boolean add(Object rowKey)
   {
     return _setSelected(rowKey, true);
   }
@@ -98,9 +97,9 @@
    * @return true if the row is now added. false otherwise.
    */
   @Override
-  public boolean invert(E rowKey)
+  public boolean invert(Object rowKey)
   {
-    Set<E> set = _getSet(true);
+    Set<Object> set = _getSet(true);
     if (!set.add(rowKey))
     {
       set.remove(rowKey);
@@ -155,7 +154,7 @@
   {
     if (c instanceof RowKeySetImpl)
     {
-      RowKeySetImpl<E> other = (RowKeySetImpl<E>) c;
+      RowKeySetImpl other = (RowKeySetImpl) c;
       if (other._default)
       {
         // the other Set has all keys added by default. It will be too
@@ -168,11 +167,11 @@
   }
 
   @Override
-  public boolean addAll(Collection<? extends E> c)
+  public boolean addAll(Collection<? extends Object> c)
   {
     if (c instanceof RowKeySetImpl)
     {
-      RowKeySetImpl<E> other = (RowKeySetImpl<E>) c;
+      RowKeySetImpl other = (RowKeySetImpl) c;
       if (other._default)
       {
         // the other Set has all keys added by default. It will be too
@@ -184,10 +183,10 @@
     return super.addAll(c);
   }
 
-  private boolean _processAll(RowKeySetImpl<E> other, boolean addAll)
+  private boolean _processAll(RowKeySetImpl other, boolean addAll)
   {
-    Set<E> set = _getSet(false);
-    Set<E> otherSet = other._getSet(false);
+    Set<Object> set = _getSet(false);
+    Set<Object> otherSet = other._getSet(false);
     if (_default == addAll)
     {
       // This Set already uses the correct default state. So all we have to do
@@ -279,7 +278,7 @@
    * iterator is being used.
    */
    @Override
-  public Iterator<E> iterator()
+  public Iterator<Object> iterator()
    {
      return _default ? _getNotInSetRowKeyIterator() : _getInSetRowKeyIterator();
    }
@@ -325,12 +324,11 @@
    * @param rowKey the rowKey of the item.
    * @return true if this set changed
    */
-  @SuppressWarnings("unchecked")
   private boolean _setSelected(Object rowKey, boolean isSelected)
   {
     if (isSelected == _default)
     {
-      if (!_set.isEmpty()) // _set != Collections.EMPTY_SET
+      if (!_set.isEmpty()) // _set != Collections.emptySet()
       {
         return _set.remove(rowKey);
       }
@@ -338,19 +336,19 @@
     }
     else
     {
-      return _getSet(true).add((E)rowKey);
+      return _getSet(true).add(rowKey);
     }
   }
 
   @SuppressWarnings("unchecked")
-  private Iterator<E> _getNotInSetRowKeyIterator()
+  private Iterator<Object> _getNotInSetRowKeyIterator()
   {
     CollectionModel table = getCollectionModel();
-    final Iterator<E> rowKeyIterator = (Iterator<E>)ModelUtils.getRowKeyIterator(table);
-    final Set<E> set = _getSet(false);
-    Iterator<E> iter = new Iterator<E>()
+    final Iterator<Object> rowKeyIterator = ModelUtils.getRowKeyIterator(table);
+    final Set<Object> set = _getSet(false);
+    Iterator<Object> iter = new Iterator<Object>()
     {
-      public E next()
+      public Object next()
       {
         if (!hasNext())
           throw new NoSuchElementException();
@@ -364,7 +362,7 @@
       {
         if (_current == null)
           throw new IllegalStateException("No element to remove");
-        Set<E> mutable = _getSet(true);
+        Set<Object> mutable = _getSet(true);
         // since this is the not-in-set iterator, we "remove" the element
         // by adding it to the Set:
         mutable.add(_current);
@@ -376,11 +374,11 @@
         return (_next != null || _first);
       }
 
-      private E _next()
+      private Object _next()
       {
         while(rowKeyIterator.hasNext())
         {
-          E rowKey = rowKeyIterator.next();
+          Object rowKey = rowKeyIterator.next();
           if (!set.contains(rowKey))
             return rowKey;
         }
@@ -388,44 +386,43 @@
       }
 
       private boolean _first = true;
-      private E _next = null;
-      private E _current = null;
+      private Object _next = null;
+      private Object _current = null;
     };
 
     iter.next(); // initialize;
     return iter;
   }
 
-  private Iterator<E> _getInSetRowKeyIterator()
+  private Iterator<Object> _getInSetRowKeyIterator()
   {
     return _getSet(false).iterator();
   }
 
-  @SuppressWarnings("unchecked")
   private void _selectAll(boolean isSelected)
   {
     _default = isSelected;
-    _set = Collections.EMPTY_SET;
+    _set = Collections.emptySet();
   }
 
-  private Set<E> _getSet(boolean create)
+  private Set<Object> _getSet(boolean create)
   {
-    if (create && (_set == Collections.EMPTY_SET))
+    if (create && (_set == Collections.emptySet()))
     {
       _set = _createSet(10);
     }
     return _set;
   }
 
-  private Set<E> _createSet(int sz)
+  private Set<Object> _createSet(int sz)
   {
     // must be cloneable:
-    return new HashSet<E>(sz);
+    return new HashSet<Object>(sz);
   }
 
   private boolean _isSelected(Object rowKey)
   {
-    Set<E> set = _getSet(false);
+    Set<Object> set = _getSet(false);
     boolean isInSet = set.contains(rowKey);
     return isInSet ^ _default;
   }
@@ -434,10 +431,10 @@
   public void writeExternal(ObjectOutput out) throws IOException
   {
     out.writeBoolean(_default);
-    Set<E> set = _getSet(false);
+    Set<Object> set = _getSet(false);
     int sz = set.size();
     out.writeInt(sz);
-    Iterator<E> iter = set.iterator();
+    Iterator<Object> iter = set.iterator();
     for(int i=0; i<sz; i++)
     {
       out.writeObject(iter.next());
@@ -445,7 +442,6 @@
   }
 
   // see java.io.Externalizable
-  @SuppressWarnings("unchecked")
   public void readExternal(ObjectInput in)
     throws IOException, ClassNotFoundException
   {
@@ -456,11 +452,11 @@
       _set = _createSet(sz);
       for(int i=0; i<sz; i++)
       {
-        _set.add((E)in.readObject());
+        _set.add(in.readObject());
       }
     }
     else
-      _set = Collections.EMPTY_SET;
+      _set = Collections.emptySet();
   }
 
   /**
@@ -469,10 +465,10 @@
    * this instance.
    */
   @Override
-  public RowKeySetImpl<E> clone()
+  public RowKeySetImpl clone()
   {
-    RowKeySetImpl<E> clone = (RowKeySetImpl<E>) super.clone();
-    Set<E> set = _getSet(false);
+    RowKeySetImpl clone = (RowKeySetImpl) super.clone();
+    Set<Object> set = _getSet(false);
     clone._set = _clone(set);
     return clone;
   }
@@ -487,7 +483,7 @@
   private <T> Set<T> _clone(Set<T> other)
   {
     if (other.isEmpty())
-      return Collections.EMPTY_SET;
+      return Collections.emptySet();
     else
       return (Set<T>) ((HashSet<T>) other).clone();
   }
@@ -508,6 +504,6 @@
   private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(RowKeySetImpl.class);
 
   private boolean _default;
-  private Set<E> _set;
+  private Set<Object> _set;
   private transient CollectionModel _model;
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.java Wed Aug 16 00:00:16 2006
@@ -34,7 +34,7 @@
  * The generic type E is the type of a rowKey.
  * @author The Oracle ADF Faces Team
  */
-public class RowKeySetTreeImpl<E> extends RowKeySet<E> implements Serializable 
+public class RowKeySetTreeImpl extends RowKeySet implements Serializable 
 {
   /**
    * Creates a new Set that is initially empty.
@@ -50,35 +50,33 @@
    */
   public RowKeySetTreeImpl(boolean addAll)
   {
-    _root = new Node<E>(addAll);
+    _root = new Node<Object>(addAll);
   }
     
   /**
    * Tests to see if the given rowKey is included in this Set.
    * @return true If the rowKey is included in this Set.
    */
-  @SuppressWarnings("unchecked")
   @Override
   public boolean contains(Object rowKey)
   {
-    return _isContained((E) rowKey);
+    return _isContained(rowKey);
   }
   
   /**
    * @deprecated do not use. this will be removed post Tier 1.
    */
-  @SuppressWarnings("unchecked")
   @Override
   @Deprecated
   public boolean isContainedByDefault()
   {
     TreeModel model = getCollectionModel();
-    E rowkey = (E) model.getRowKey();
+    Object rowkey = model.getRowKey();
     return new Search().find(rowkey).isDefaultContained;
   }
 
   @Override
-  public Iterator<E> iterator()
+  public Iterator<Object> iterator()
   {
     return new PathIterator();
   }
@@ -90,7 +88,7 @@
    * @see #addAll()
    */
   @Override
-  public boolean add(E rowKey)
+  public boolean add(Object rowKey)
   {
     return _setContained(rowKey, true);    
   }
@@ -101,11 +99,10 @@
    * @see #add(E)
    * @see #removeAll()
    */
-  @SuppressWarnings("unchecked")
   @Override
   public boolean remove(Object rowKey)
   {
-    return _setContained((E) rowKey, false);    
+    return _setContained(rowKey, false);    
   }
 
   /**
@@ -140,11 +137,11 @@
    * optimized to give superior performance and avoid iteration.
    */
   @Override
-  public boolean addAll(Collection<? extends E> other)
+  public boolean addAll(Collection<? extends Object> other)
   {
     if (other instanceof RowKeySetTreeImpl)
     {
-      RowKeySetTreeImpl<E> otherset = (RowKeySetTreeImpl<E>) other;
+      RowKeySetTreeImpl otherset = (RowKeySetTreeImpl) other;
       return _processOperation(this._root, otherset._root, true);
     }
     return super.addAll(other);
@@ -161,13 +158,13 @@
   {
     if (other instanceof RowKeySetTreeImpl)
     {
-      RowKeySetTreeImpl<E> otherset = (RowKeySetTreeImpl<E>) other;
+      RowKeySetTreeImpl otherset = (RowKeySetTreeImpl) other;
       return _processOperation(this._root, otherset._root, false);
     }
     return super.removeAll(other);
   }
 
-  private boolean _processOperation(Node<E> set1, Node<E> set2, boolean add)
+  private boolean _processOperation(Node<Object> set1, Node<Object> set2, boolean add)
   {
     /*      
      * setXdef = setX.isDefaultContained
@@ -207,17 +204,17 @@
     // has everything):
     boolean addAll = add ^ set1.isDefaultContained;
     
-    for(Entry<E, Node<E>> en:set2.entrySet())
+    for(Entry<Object, Node<Object>> en:set2.entrySet())
     {
-      E segment = en.getKey();
-      Node<E> subset2 = en.getValue();
-      Node<E> subset1 = set1.get(segment);
+      Object segment = en.getKey();
+      Node<Object> subset2 = en.getValue();
+      Node<Object> subset1 = set1.get(segment);
       
       if (subset1 == null)
       {
         if (addAll)
         {
-          subset1 = new Node<E>(set1, segment);
+          subset1 = new Node<Object>(set1, segment);
           hasChanges = true;
         }
         else
@@ -306,9 +303,9 @@
    * clone without affecting this instance.
    */
   @Override
-  public RowKeySetTreeImpl<E> clone()
+  public RowKeySetTreeImpl clone()
   {
-    RowKeySetTreeImpl<E> clone = (RowKeySetTreeImpl<E>) super.clone();
+    RowKeySetTreeImpl clone = (RowKeySetTreeImpl) super.clone();
     clone._root = _root.clone();
     return clone;
   }
@@ -345,7 +342,7 @@
    * @param exclusions any rowKeys present in this Set are excluded from the count.
    */
   @SuppressWarnings("unchecked")
-  private int _getTreeSize(TreeModel model, Set<E> exclusions)
+  private int _getTreeSize(TreeModel model, Set<Object> exclusions)
   {
     int sz = 0;
     for(int i=0;true;i++)
@@ -353,14 +350,14 @@
       model.setRowIndex(i);
       if (model.isRowAvailable())
       {
-        E rowkey = (E) model.getRowKey();
+        Object rowkey = model.getRowKey();
         if (exclusions.contains(rowkey))
           continue;
         sz++;
         if (model.isContainer())
         {
           model.enterContainer();
-          Set<E> empty = Collections.emptySet();
+          Set<Object> empty = Collections.emptySet();
           sz += _getTreeSize(model, empty);
           model.exitContainer();
         }
@@ -370,7 +367,7 @@
     }
   }
 
-  private int _getSize(E rowkey, Node<E> set, TreeModel model,  boolean fetchall)
+  private int _getSize(Object rowkey, Node<Object> set, TreeModel model,  boolean fetchall)
   {
     // special-case the root collection:
     int sz = ((rowkey != null) && (set.isDefaultContained ^ set.isDifferent)) ? 1 : 0;
@@ -400,10 +397,10 @@
       }
     }
     
-    for(Entry<E, Node<E>> en:set.entrySet())
+    for(Entry<Object, Node<Object>> en:set.entrySet())
     {
-      E newrowkey = en.getKey();
-      Node<E> subset = en.getValue();
+      Object newrowkey = en.getKey();
+      Node<Object> subset = en.getValue();
       int size = _getSize(newrowkey, subset, model, fetchall);
       if (size < 0)
         return -1;
@@ -416,13 +413,12 @@
    * adds or removes all the paths rooted at the current path 
    * @param isSelectAll if true does an add-all. else does remove-all.
    */
-  @SuppressWarnings("unchecked")
   private void _selectAll(final boolean isSelectAll)
   {
     Search search = new Search()
     {
       @Override
-      protected boolean create(Node<E> parent, E rowkey)
+      protected boolean create(Node<Object> parent, Object rowkey)
       {
         // if the parent does not have the correct default, then
         // we need to add entries for the children, since we need
@@ -431,7 +427,7 @@
       }
       
       @Override
-      protected Node<E> found(Node<E> child)
+      protected Node<Object> found(Node<Object> child)
       {
         child.isDefaultContained = isSelectAll;
         child.isDifferent = false;
@@ -441,22 +437,22 @@
     };
 
     TreeModel model = getCollectionModel();
-    E rowkey = (E) model.getRowKey();
+    Object rowkey = model.getRowKey();
     search.find(rowkey);    
   }
 
-  private boolean _isContained(E rowkey)
+  private boolean _isContained(Object rowkey)
   {
     Search search = new Search()
     {
       @Override
-      protected Node<E> notFound(Node<E> parent, E rowkey)
+      protected Node<Object> notFound(Node<Object> parent, Object rowkey)
       {
         return parent.isDefaultContained ? parent : null;
       }
       
       @Override
-      protected Node<E> found(Node<E> child)
+      protected Node<Object> found(Node<Object> child)
       {
         return (child.isDefaultContained ^ child.isDifferent) ? child : null;
       }
@@ -471,12 +467,12 @@
    * it is removed.
    * @return true if this Set changed due to this operation. 
    */
-  private boolean _setContained(E rowkey, final boolean isContained)
+  private boolean _setContained(Object rowkey, final boolean isContained)
   {
     Search search = new Search()
     {
       @Override
-      protected boolean create(Node<E> parent, E rowkey)
+      protected boolean create(Node<Object> parent, Object rowkey)
       {
         // only need to create child deltas, if the parent's
         // default is wrong:
@@ -484,13 +480,13 @@
       }
       
       @Override
-      protected Node<E> notFound(Node<E> parent, E rowkey)
+      protected Node<Object> notFound(Node<Object> parent, Object rowkey)
       {
         return null;
       }
     };
 
-    Node<E> current = search.find(rowkey);
+    Node<Object> current = search.find(rowkey);
     if ((current != null) &&
         ((current.isDefaultContained ^ current.isDifferent) != isContained))
     {
@@ -578,39 +574,38 @@
     {
     }
     
-    protected boolean create(Node<E> parent, E rowkey)
+    protected boolean create(Node<Object> parent, Object rowkey)
     {
       return false;
     }
 
-    protected Node<E> notFound(Node<E> parent, E rowkey)
+    protected Node<Object> notFound(Node<Object> parent, Object rowkey)
     {
       return parent;
     }
 
-    protected Node<E> found(Node<E> result)
+    protected Node<Object> found(Node<Object> result)
     {
       return result;
     }
 
-    @SuppressWarnings("unchecked")
-    public Node<E> find(E rowkey)
+    public Node<Object> find(Object rowkey)
     {
-      Node<E> current = _root;
+      Node<Object> current = _root;
       if (rowkey != null)
       {
         TreeModel model = getCollectionModel();
-        List<E> parentkeys = (List<E>)model.getAllAncestorContainerRowKeys(rowkey);
-        List<E> allkeys = new ArrayList<E>(parentkeys.size() + 1);
+        List<Object> parentkeys = model.getAllAncestorContainerRowKeys(rowkey);
+        List<Object> allkeys = new ArrayList<Object>(parentkeys.size() + 1);
         allkeys.addAll(parentkeys);
         allkeys.add(rowkey);
-        for(E key:allkeys)
+        for(Object key:allkeys)
         {
-          Node<E> next = current.get(key);
+          Node<Object> next = current.get(key);
           if (next == null)
           {
             if (create(current, key))
-              next = new Node<E>(current, key);       
+              next = new Node<Object>(current, key);       
             else
               return notFound(current, key);
           }
@@ -621,18 +616,18 @@
     }
   }
 
-  private final class PathIterator implements Iterator<E>
+  private final class PathIterator implements Iterator<Object>
   {
     PathIterator()
     {
       _value = _next(); // initialize;
     }
 
-    public E next()
+    public Object next()
     {
       if (!hasNext())
         throw new NoSuchElementException();
-      E value = _value;
+      Object value = _value;
       _value = _next();
       return value;
     }
@@ -647,23 +642,22 @@
       throw new UnsupportedOperationException();
     }
     
-    private boolean _containsSubtree(E rowkey)
+    private boolean _containsSubtree(Object rowkey)
     {
       Search search = new Search()
       {
         @Override
-        protected Node<E> notFound(Node<E> parent, E rowkey)
+        protected Node<Object> notFound(Node<Object> parent, Object rowkey)
         {
           return parent.isDefaultContained ? parent : null;
         }
       };
-      Node<E> current = search.find(rowkey);
+      Node<Object> current = search.find(rowkey);
       return (current != null) && 
         ((!current.isEmpty()) || current.isDefaultContained);
     }
     
-    @SuppressWarnings("unchecked")
-    private E _next()
+    private Object _next()
     {
       TreeModel model = getCollectionModel();
       if (model == null)
@@ -680,7 +674,7 @@
           if (!hasMore)
             return null;
 
-          _currPath = (E) model.getRowKey();
+          _currPath = model.getRowKey();
           if (contains(_currPath))
             return _currPath;
         }
@@ -690,10 +684,10 @@
       }
     }
     
-    private E _value;
-    private E _currPath = null;
+    private Object _value;
+    private Object _currPath = null;
   }
   
-  private Node<E> _root;
+  private Node<Object> _root;
   private transient TreeModel _model = null;
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/SortableModel.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/SortableModel.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/SortableModel.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/SortableModel.java Wed Aug 16 00:00:16 2006
@@ -169,13 +169,17 @@
     }
   }
 
-  @SuppressWarnings("unchecked")
   @Override
   public List<SortCriterion> getSortCriteria()
   {
-    return (_sortCriterion == null)
-      ? Collections.EMPTY_LIST
-      : Collections.singletonList(_sortCriterion);
+    if (_sortCriterion == null)
+    {
+      return Collections.emptyList();
+    }
+    else
+    {
+      return Collections.singletonList(_sortCriterion);
+    }
   }
 
   @Override

Modified: incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/TreeModel.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/TreeModel.java?rev=431848&r1=431847&r2=431848&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/TreeModel.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-api/src/main/java/org/apache/myfaces/trinidad/model/TreeModel.java Wed Aug 16 00:00:16 2006
@@ -175,15 +175,14 @@
    * The first rowKey (in this list) is the top most container. The last
    * rowKey is the immediate container of the given childRowKey.
    */
-  @SuppressWarnings("unchecked")
   public List<Object> getAllAncestorContainerRowKeys(Object childRowKey)
   {
     if (childRowKey == null)
-      return Collections.EMPTY_LIST;
+      return Collections.emptyList();
 
     int size = getDepth(childRowKey);
     if (size <= 0)
-      return Collections.EMPTY_LIST;
+      return Collections.emptyList();
       
     Object[] keys = new Object[size];
     for(int i=size-1; i>=0; i--)



Mime
View raw message