incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r429208 [13/14] - in /incubator/adffaces/trunk/trinidad: trinidad-api/src/main/java/org/apache/myfaces/trinidad/bean/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/component/ trinidad-api/src/main/java/org/apache/myfaces/trinidad/c...
Date Sun, 06 Aug 2006 23:12:54 GMT
Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocument.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocument.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocument.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocument.java Sun Aug  6 16:12:37 2006
@@ -64,6 +64,7 @@
    * Creates a StyleSheetDocument
    * @deprecated colorScheme elements are no longer supported
    */
+  @Deprecated
   public StyleSheetDocument(
     StyleSheetNode[] styleSheets,
     ColorSchemeNode[] colorSchemes
@@ -76,6 +77,7 @@
    * Creates a StyleSheetDocument
    * @deprecated colorScheme elements are no longer supported
    */
+  @Deprecated
   public StyleSheetDocument(
     StyleSheetNode[] styleSheets,
     ColorSchemeNode[] colorSchemes,
@@ -135,33 +137,39 @@
   /**
    * Implementation of StyleSheetDocument.getStyleSheets();
    */
-  public Iterator getStyleSheets()
+  public Iterator<StyleSheetNode> getStyleSheets()
   {
     if(_styleSheets==null)
     {
-      return  (Arrays.asList(new Object[0])).iterator();
+      // -= Simon Lessard =- 
+      // TODO: Collections.EMPTY_LIST maybe?
+      return  (Arrays.asList(new StyleSheetNode[0])).iterator();
     }
     else
-    return (Arrays.asList(_styleSheets)).iterator();
+    {
+      return (Arrays.asList(_styleSheets)).iterator();
+    }
   }
 
   /**
    * Implementation of StyleSheetDocument.getColorSchemes();
    */
-  public Iterator getColorSchemes()
+  public Iterator<ColorSchemeNode> getColorSchemes()
   {
-    return (Arrays.asList(new Object[0])).iterator();
+    // -= Simon Lessard =- 
+    // TODO: Wouldn't Collections.EMPTY_LIST be better?
+    return (Arrays.asList(new ColorSchemeNode[0])).iterator();
   }
 
   /**
    * Returns all StyleSheetNodes which can be applied to the specified
    * context, sorted from lowest to highest precedence.
    */
-  public Iterator getStyleSheets(StyleContext context)
+  public Iterator<StyleSheetNode> getStyleSheets(StyleContext context)
   {
     // =-=ags Should this include the UserStyleSheet?
     if(_getStyleSheets(context,false)==null)
-      return (Arrays.asList(new Object[0])).iterator();
+      return (Arrays.asList(new StyleSheetNode[0])).iterator();
     else
       return (Arrays.asList(_getStyleSheets(context, false))).iterator();
   }
@@ -169,7 +177,8 @@
   /**
    * Returns an Iterator of StyleNode objects for the specified context.
    */
-  public Iterator getStyles(StyleContext context)
+  @SuppressWarnings("unchecked")
+  public Iterator<StyleNode> getStyles(StyleContext context)
   {
     // Get the matching style sheets, including the UserStyleSheet
     StyleSheetNode[] styleSheets = _getStyleSheets(context, true);
@@ -180,13 +189,19 @@
     // resolving each one along the way.  We store resolved StyleNodes in
     // a Vector, so that the generated CSS somewhat matches the order that
     // the style elements appear in the XSS document.
-    ArrayList styles = new ArrayList();
+    ArrayList<StyleNode> styles = new ArrayList<StyleNode>();
 
     // We also need to provide a Map for storing selector-based
     // styles and another for storing name-based styles, used by
     // _resolveStyle() to store results
-    Hashtable resolvedStyles = new Hashtable();
-    Hashtable resolvedNamedStyles = new Hashtable();
+    // -= Simon Lessard =- 
+    // TODO: Check if synchronization is truly required
+    Hashtable<String, StyleNode> resolvedStyles = 
+      new Hashtable<String, StyleNode>();
+    // -= Simon Lessard =- 
+    // TODO: Check if synchronization is truly required    
+    Hashtable<String, StyleNode> resolvedNamedStyles = 
+      new Hashtable<String, StyleNode>();
 
     // Now, loop through all StyleNodes in all StyleSheetNodes
     // Note: The algorithm used here is actually much more inefficient
@@ -202,12 +217,12 @@
     for (int i = 0; i < styleSheets.length; i++)
     {
       StyleSheetNode styleSheet = styleSheets[i];
-      Iterator e = styleSheet.getStyles();
+      Iterator<StyleNode> e = styleSheet.getStyles();
       if (e != null)
       {
         while (e.hasNext())
         {
-          StyleNode node = (StyleNode)e.next();
+          StyleNode node = e.next();
           String id = null;
           boolean isNamed = false;
 
@@ -297,13 +312,15 @@
     int mode = NameUtils.getMode(ModeUtils.getCurrentMode(context));
     TrinidadAgent agent = context.getAgent();
 
-    Vector v = new Vector();           // Vector of matching style sheets
-    Iterator e = getStyleSheets();  // Enum of all style sheets
+    // -= Simon Lessard =- 
+    // TODO: Check if synchronization is truly required    
+    Vector<StyleSheetNode> v = new Vector<StyleSheetNode>(); // Vector of matching style sheets
+    Iterator<StyleSheetNode> e = getStyleSheets();  // Enum of all style sheets
 
     // Loop through the style sheets, storing matches in the Vector
     while (e.hasNext())
     {
-      StyleSheetNode styleSheet = (StyleSheetNode)e.next();
+      StyleSheetNode styleSheet = e.next();
 
       if (styleSheet.compareVariants(locale, direction, agent, mode) > 0)
         v.addElement(styleSheet);
@@ -316,11 +333,12 @@
     // Sort the matching style sheets by specificity
     StyleSheetNode[] styleSheets = new StyleSheetNode[count];
     v.copyInto(styleSheets);
-    Comparator comparator = new StyleSheetComparator(locale,
-                                                     direction,
-                                                     agent,
-                                                     mode,
-                                                     _styleSheets);
+    Comparator<StyleSheetNode> comparator = 
+      new StyleSheetComparator(locale,
+                               direction,
+                               agent,
+                               mode,
+                               _styleSheets);
 
     Arrays.sort(styleSheets, comparator);
 
@@ -357,10 +375,12 @@
     if (styleSheets == null)
       return null;
 
+    // -= Simon Lessard =- 
+    // TODO: Check if synchronization is truly required
     return _resolveStyle(context,
                          styleSheets,
-                         new Hashtable(19),  // Resolved styles
-                         new Hashtable(19),  // Resolved named styles
+                         new Hashtable<String, StyleNode>(19),  // Resolved styles
+                         new Hashtable<String, StyleNode>(19),  // Resolved named styles
                          null,               // Include stack
                          null,               // Named include stack
                          id,
@@ -388,14 +408,14 @@
    *           Map.
    */
   private StyleNode _resolveStyle(
-    StyleContext     context,
-    StyleSheetNode[] styleSheets,
-    Map       resolvedStyles,
-    Map       resolvedNamedStyles,
-    Stack            includesStack,
-    Stack            namedIncludesStack,
-    String           id,
-    boolean          isNamed
+    StyleContext           context,
+    StyleSheetNode[]       styleSheets,
+    Map<String, StyleNode> resolvedStyles,
+    Map<String, StyleNode> resolvedNamedStyles,
+    Stack<String>          includesStack,
+    Stack<String>          namedIncludesStack,
+    String                 id,
+    boolean                isNamed
     )
   {
     assert (styleSheets != null);
@@ -411,12 +431,12 @@
 
     if (isNamed)
     {
-      style = (StyleNode)resolvedNamedStyles.get(id);
+      style = resolvedNamedStyles.get(id);
       name = id;
     }
     else
     {
-      style = (StyleNode)resolvedStyles.get(id);
+      style = resolvedStyles.get(id);
       selector = id;
     }
 
@@ -447,15 +467,19 @@
     // Push this style onto the appropriate include stack
     if (isNamed)
     {
+      // -= Simon Lessard =- 
+      // TODO: Check if synchronization is truly required
       if (namedIncludesStack == null)
-        namedIncludesStack = new Stack();
+        namedIncludesStack = new Stack<String>();
 
       namedIncludesStack.push(id);
     }
     else
     {
+      // -= Simon Lessard =- 
+      // TODO: Check if synchronization is truly required
       if (includesStack == null)
-        includesStack = new Stack();
+        includesStack = new Stack<String>();
 
       includesStack.push(id);
     }
@@ -465,12 +489,12 @@
     // included styles along the way.
     for (int i = 0; i < styleSheets.length; i++)
     {
-      Iterator nodes = styleSheets[i].getStyles();
+      Iterator<StyleNode> nodes = styleSheets[i].getStyles();
       if (nodes != null)
       {
         while (nodes.hasNext())
         {
-          StyleNode node = (StyleNode)nodes.next();
+          StyleNode node = nodes.next();
 
           if ((isNamed && name.equals(node.getName())) ||
                (!isNamed && selector.equals(node.getSelector())))
@@ -491,13 +515,12 @@
               entry.resetProperties();
 
             // 1. Resolve included styles
-            Iterator includedStyles = node.getIncludedStyles();
+            Iterator<IncludeStyleNode> includedStyles = node.getIncludedStyles();
             if (includedStyles != null)
             {
               while (includedStyles.hasNext())
               {
-                IncludeStyleNode includeStyle = (IncludeStyleNode)
-                                                  includedStyles.next();
+                IncludeStyleNode includeStyle = includedStyles.next();
                 String includeID = null;
                 boolean includeIsNamed = false;
 
@@ -526,13 +549,13 @@
             }
 
             // 2. Resolve included properties
-            Iterator includedProperties = node.getIncludedProperties();
+            Iterator<IncludePropertyNode> includedProperties = 
+              node.getIncludedProperties();
             if (includedProperties != null)
             {
               while (includedProperties.hasNext())
               {
-                IncludePropertyNode includeProperty = (IncludePropertyNode)
-                                              includedProperties.next();
+                IncludePropertyNode includeProperty = includedProperties.next();
                 String includeID = null;
                 boolean includeIsNamed = false;
 
@@ -566,17 +589,18 @@
             }
 
             // 3. Add compound properties
-            Iterator compoundProperties = node.getCompoundProperties();
+            Iterator<CompoundPropertyNode> compoundProperties = 
+              node.getCompoundProperties();
+            
             if (compoundProperties != null)
             {
               while (compoundProperties.hasNext())
               {
-                CompoundPropertyNode compoundProperty  =
-                  (CompoundPropertyNode)compoundProperties.next();
+                CompoundPropertyNode compoundProperty = compoundProperties.next();
 
                 // Build up the value String for the compound property
                 StringBuffer buffer = new StringBuffer();
-                Iterator values = compoundProperty.getValues();
+                Iterator<Object> values = compoundProperty.getValues();
                 if (values != null)
                 {
                   while (values.hasNext())
@@ -638,11 +662,11 @@
             }
 
             // 4. Add non-included properties
-            Iterator properties = node.getProperties();
+            Iterator<PropertyNode> properties = node.getProperties();
             if (properties != null)
             {
               while (properties.hasNext())
-                entry.addProperty((PropertyNode)properties.next());
+                entry.addProperty(properties.next());
             }
           }
         }
@@ -673,11 +697,11 @@
     if (node == null)
       return;
 
-    Iterator properties = node.getProperties();
+    Iterator<PropertyNode> properties = node.getProperties();
     if (properties != null)
     {
       while (properties.hasNext())
-        entry.addIncludedProperty((PropertyNode)properties.next());
+        entry.addIncludedProperty(properties.next());
     }
   }
 
@@ -692,12 +716,12 @@
     if (node == null)
       return;
 
-    Iterator properties = node.getProperties();
+    Iterator<PropertyNode> properties = node.getProperties();
     if (properties != null)
     {
       while (properties.hasNext())
       {
-        PropertyNode property = (PropertyNode)properties.next();
+        PropertyNode property = properties.next();
         if (propertyName.equals(property.getName()))
         {
           if (!propertyName.equals(localPropertyName))
@@ -713,7 +737,7 @@
   }
 
   // Returns a count of the non-null items in the Vector
-  private static int _getNonNullCount(ArrayList list)
+  private static int _getNonNullCount(ArrayList<?> list)
   {
     if (list == null)
       return 0;
@@ -776,12 +800,12 @@
   // Returns the value of the property with the specified name
   private String _getPropertyValue(StyleNode style, String propertyName)
   {
-    Iterator properties = style.getProperties();
+    Iterator<PropertyNode> properties = style.getProperties();
     if (properties != null)
     {
       while (properties.hasNext())
       {
-        PropertyNode property = (PropertyNode)properties.next();
+        PropertyNode property = properties.next();
         if (propertyName.equals(property.getName()))
           return property.getValue();
       }
@@ -794,10 +818,12 @@
   private StyleSheetNode _createStyleSheetNode(UserStyleSheet userStyleSheet)
   {
     // Convert each Style in the userStyleSheet to a StyleNode
-    Vector v = new Vector();
+    // -= Simon Lessard =- 
+    // TODO: Check if synchronization is truly required
+    Vector<StyleNode> v = new Vector<StyleNode>();
 
     // First, add the selector-based styles
-    Iterator selectors = userStyleSheet.getSelectors();
+    Iterator<Object> selectors = userStyleSheet.getSelectors();
     while (selectors.hasNext())
     {
       String selector = (String)selectors.next();
@@ -807,7 +833,7 @@
     }
 
     // Now, add in the named styles
-    Iterator names = userStyleSheet.getNames();
+    Iterator<Object> names = userStyleSheet.getNames();
     while (names.hasNext())
     {
       String name = (String)names.next();
@@ -833,8 +859,10 @@
   private StyleNode _createStyleNode(String key, Style style, boolean isNamed)
   {
     // Covert the properties into PropertyNodes
-    Vector v = new Vector();
-    Iterator names = style.getPropertyNames();
+    // -= Simon Lessard =- 
+    // TODO: Check if synchronization is truly required
+    Vector<PropertyNode> v = new Vector<PropertyNode>();
+    Iterator<Object> names = style.getPropertyNames();
 
     while (names.hasNext())
     {
@@ -854,7 +882,7 @@
   }
 
   // Tests whether the value is present in the (possibly null) stack.
-  private static boolean _stackContains(Stack stack, Object value)
+  private static boolean _stackContains(Stack<?> stack, Object value)
   {
     if (stack == null)
       return false;
@@ -863,7 +891,7 @@
   }
 
   // Tests whether the value is present in the (possibly null) stack.
-  private static boolean _containsStyle(List v, StyleNode node)
+  private static boolean _containsStyle(List<StyleNode> v, StyleNode node)
   {
     String id = null;
     boolean isNamed = false;
@@ -877,10 +905,9 @@
     {
       id = node.getSelector();
     }
-
-    for (int i = 0; i < v.size(); i++)
+    
+    for(StyleNode otherNode : v)
     {
-      StyleNode otherNode = (StyleNode)v.get(i);
       if ((isNamed && id.equals(otherNode.getName())) ||
            (!isNamed && id.equals(otherNode.getSelector())))
         return true;
@@ -890,7 +917,7 @@
   }
 
   // Comparator for StyleSheetNodes which sorts by variant specificity
-  private static class StyleSheetComparator implements Comparator
+  private static class StyleSheetComparator implements Comparator<StyleSheetNode>
   {
     public StyleSheetComparator(
       Locale locale,
@@ -907,20 +934,20 @@
       _mode = mode;
     }
 
-    public int compare(Object item1, Object item2)
+    public int compare(StyleSheetNode item1, StyleSheetNode item2)
     {
-      if (!(item1 instanceof StyleSheetNode)||!(item2 instanceof StyleSheetNode))
-      {
-        throw new IllegalArgumentException("Argument not an instance of StyleSheetNode");
-      }
-
       if (item1 == item2)
         return 0;
 
-      int match1 = ((StyleSheetNode)item1).compareVariants(
-                      _locale, _direction, _agent, _mode);
-      int match2 = ((StyleSheetNode)item2).compareVariants(
-                     _locale, _direction, _agent, _mode);
+      int match1 = item1.compareVariants(_locale, 
+                                         _direction, 
+                                         _agent, 
+                                         _mode);
+      
+      int match2 = item2.compareVariants(_locale, 
+                                         _direction, 
+                                         _agent, 
+                                         _mode);
 
       if (match1 == match2)
       {
@@ -996,7 +1023,7 @@
     public void addProperty(PropertyNode property)
     {
       if (_properties == null)
-        _properties = new ArrayList(5);
+        _properties = new ArrayList<PropertyNode>(5);
 
 
       // Relative font sizes are a special case - they get added to
@@ -1047,14 +1074,14 @@
     }
 
     // Returns an Iterator of the properties defined by this style
-    public Iterator getProperties()
+    public Iterator<PropertyNode> getProperties()
     {
       if (_properties == null)
         return null;
 
       return new
         FontSizeConverter(
-          new NonNullIterator(
+          new NonNullIterator<PropertyNode>(
             _properties.iterator()),
           _relativeFontSize);
     }
@@ -1110,15 +1137,18 @@
 
     // Tests whether a property with the specified name is
     // contained within the Vector of PropertyNodes
-    private boolean _containsProperty(ArrayList properties, String name)
+    // -= Simon Lessard =-
+    // FIXME: Never used locally as of 2006-08-04
+    @SuppressWarnings("unused")
+    private boolean _containsProperty(
+        ArrayList<PropertyNode> properties, 
+        String name)
     {
       if (properties == null)
         return false;
-
-      for (int i = 0; i < properties.size(); i++)
+      
+      for(PropertyNode property : properties)
       {
-        PropertyNode property = (PropertyNode)properties.get(i);
-
         if ((property != null) && (name.equals(property.getName())))
           return true;
       }
@@ -1131,14 +1161,16 @@
     // Vector will contain at most one property with the specified
     // name.  Returns a boolean indicating whether the specified
     // property was found (and thus removed).
-    private boolean _removeProperty(ArrayList properties, String name)
+    private boolean _removeProperty(
+        ArrayList<PropertyNode> properties, 
+        String name)
     {
       if (properties == null)
         return false;
 
       for (int i = 0; i < properties.size(); i++)
       {
-        PropertyNode property = (PropertyNode)properties.get(i);
+        PropertyNode property = properties.get(i);
 
         if ((property != null) && property.getName().equals(name))
         {
@@ -1157,7 +1189,10 @@
 
     // Copies the non-null entries from the source vector to the
     // target Object array, starting at the specified index
-    private void _nonNullCopyInto(ArrayList source, Object[] target, int start)
+    private void _nonNullCopyInto(
+        ArrayList<? extends Object> source, 
+        Object[] target, 
+        int start)
     {
       if (source == null)
         return;
@@ -1321,10 +1356,8 @@
     {
       if (_properties != null)
       {
-        for (int i = 0; i < _properties.size(); i++)
+        for(PropertyNode property : _properties)
         {
-          PropertyNode property =
-            (PropertyNode)_properties.get(i);
           if ((property != null) && (name.equals(property.getName())))
             return property.getValue();
         }
@@ -1334,7 +1367,7 @@
     }
 
     // The set of properties (PropertyNodes) defined by this style
-    private ArrayList _properties;
+    private ArrayList<PropertyNode> _properties;
 
     // We keep count of the number of non-null values in each vector
     private int _propertyCount;
@@ -1348,9 +1381,9 @@
   // from a wrapped Iterator.  StyleEntry uses this to avoid
   // exposing null properties which result from removal of duplicate
   // properties (really, nulling out of duplicate properties).
-  private static class NonNullIterator implements Iterator
+  private static class NonNullIterator<T> implements Iterator<T>
   {
-    public NonNullIterator(Iterator wrappedIterator)
+    public NonNullIterator(Iterator<T> wrappedIterator)
     {
       _wrappedIterator = wrappedIterator;
 
@@ -1363,9 +1396,9 @@
       return (_next != null);
     }
 
-    public Object next()
+    public T next()
     {
-      Object next = _next;
+      T next = _next;
       _next = _getNonNullNext();
 
       return next;
@@ -1377,11 +1410,11 @@
     }
 
     // Returns the next non null value in the wrapped enum
-    private Object _getNonNullNext()
+    private T _getNonNullNext()
     {
       while (_wrappedIterator.hasNext())
       {
-        Object next = _wrappedIterator.next();
+        T next = _wrappedIterator.next();
 
         if (next != null)
           return next;
@@ -1391,21 +1424,21 @@
     }
 
     // The wrapped enumeration
-    private Iterator _wrappedIterator;
+    private Iterator<T> _wrappedIterator;
 
     // The next non-null value in the wrapped enumeration
-    private Object _next;
+    private T _next;
   }
 
   // Iterator implementation for empty set
-  private static class EmptyIterator implements Iterator
+  private static class EmptyIterator<T> implements Iterator<T>
   {
     private EmptyIterator() {}
 
-    public static Iterator getInstance()
+    public static Iterator<StyleNode> getInstance()
     {
       if (_sInstance == null)
-        _sInstance = new EmptyIterator();
+        _sInstance = new EmptyIterator<StyleNode>();
 
       return _sInstance;
     }
@@ -1415,7 +1448,7 @@
       return false;
     }
 
-    public Object next()
+    public T next()
     {
       throw new NoSuchElementException();
     }
@@ -1425,16 +1458,16 @@
       throw new UnsupportedOperationException();
     }
 
-    private static Iterator _sInstance;
+    private static Iterator<StyleNode> _sInstance;
   }
 
 
   // A silly Iterator which converts "font-size" PropertyNodes to
   // absolute values, using a specified relative font size
-  private static class FontSizeConverter implements Iterator
+  private static class FontSizeConverter implements Iterator<PropertyNode>
   {
     public FontSizeConverter(
-      Iterator wrappedIterator,
+      Iterator<PropertyNode> wrappedIterator,
       int relativeFontSize
       )
     {
@@ -1452,9 +1485,9 @@
       _wrappedIterator.remove();
     }
 
-    public Object next()
+    public PropertyNode next()
     {
-      PropertyNode property = (PropertyNode)_wrappedIterator.next();
+      PropertyNode property = _wrappedIterator.next();
 
       if ((_relativeFontSize == 0) ||
            !_FONT_SIZE_NAME.equals(property.getName()))
@@ -1466,7 +1499,7 @@
     }
 
     // The wrapped enumeration
-    private Iterator _wrappedIterator;
+    private Iterator<PropertyNode> _wrappedIterator;
     private int         _relativeFontSize;
   }
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetDocumentParser.java Sun Aug  6 16:12:37 2006
@@ -54,6 +54,7 @@
   /**
    * Implementation of NodeParser.endElement()
    */
+  @Override
   public void startElement(
     ParseContext context,
     String       namespaceURI,
@@ -66,6 +67,7 @@
   /**
    * Implementation of NodeParser.endElement()
    */
+  @Override
   public Object endElement(
     ParseContext context,
     String       namespaceURI,
@@ -87,6 +89,7 @@
   /**
    * Implementation of NodeParser.startChildElement()
    */
+  @Override
   public NodeParser startChildElement(
     ParseContext context,
     String       namespaceURI,
@@ -132,6 +135,7 @@
   /**
    * Implementation of NodeParser.addCompletedChild().
    */
+  @Override
   public void addCompletedChild(
     ParseContext context,
     String       namespaceURI,
@@ -144,16 +148,16 @@
       if (localName.equals(STYLE_SHEET_NAME))
       {
         if (_styleSheets == null)
-          _styleSheets = new Vector();
+          _styleSheets = new Vector<StyleSheetNode>();
 
-        _styleSheets.addElement(child);
+        _styleSheets.addElement((StyleSheetNode)child);
       }
       else if (localName.equals(COLOR_SCHEME_NAME))
       {
         if (_colorSchemes == null)
-          _colorSchemes = new Vector();
+          _colorSchemes = new Vector<ColorSchemeNode>();
 
-        _colorSchemes.addElement(child);
+        _colorSchemes.addElement((ColorSchemeNode)child);
       }
     }
   }
@@ -177,13 +181,14 @@
     {
       // If we've got imported documents, copy all style sheets
       // into a Vector first.
-      Vector v = new Vector();
-      for (int i = 0; i < _imports.size(); i++)
+      // -= Simon Lessard =-
+      // TODO: Check if synchronization is truly required.
+      Vector<StyleSheetNode> v = new Vector<StyleSheetNode>();
+      for(StyleSheetDocument doc : _imports)
       {
-        StyleSheetDocument doc = (StyleSheetDocument)_imports.get(i);
-        Iterator e = doc.getStyleSheets();
+        Iterator<StyleSheetNode> e = doc.getStyleSheets();
         while (e.hasNext())
-          v.addElement((StyleSheetNode)e.next());
+          v.addElement(e.next());
       }
 
       // Might as well add the rest of the style sheets in now too
@@ -208,19 +213,20 @@
   {
     // We collect ColorSchemeNodes in a dictionary (hashed by namespaceURI +
     // name) to simplify merging
-    Hashtable colorSchemesTable = new Hashtable(19);
+    // -= Simon Lessard =-
+    // TODO: Check if synchronization is really needed.
+    Hashtable<String, ColorSchemeNode> colorSchemesTable = 
+      new Hashtable<String, ColorSchemeNode>(19);
 
     // Merge in imported color schemes first
     if (_imports != null)
     {
-      for (int i = 0; i < _imports.size(); i++)
+      for(StyleSheetDocument doc : _imports)
       {
-        StyleSheetDocument doc = (StyleSheetDocument)_imports.get(i);
-        Iterator e = doc.getColorSchemes();
+        Iterator<ColorSchemeNode> e = doc.getColorSchemes();
         while (e.hasNext())
         {
-          _mergeColorScheme(colorSchemesTable,
-                            (ColorSchemeNode)e.next());
+          _mergeColorScheme(colorSchemesTable, e.next());
         }
       }
     }
@@ -230,20 +236,17 @@
     {
       for (int i = 0; i < _colorSchemes.size(); i++)
       {
-        _mergeColorScheme(colorSchemesTable,
-                          (ColorSchemeNode)_colorSchemes.elementAt(i));
+        _mergeColorScheme(colorSchemesTable, _colorSchemes.elementAt(i));
       }
     }
 
     // Now, copy everything into a single array
     int count = colorSchemesTable.size();
     ColorSchemeNode[] colorSchemes = new ColorSchemeNode[count];
-    Iterator values = colorSchemesTable.values().iterator();
     int i = 0;
-    while (values.hasNext())
+    for(ColorSchemeNode node : colorSchemesTable.values())
     {
-      colorSchemes[i] = (ColorSchemeNode)values.next();
-      i++;
+      colorSchemes[i++] = node;
     }
 
     return colorSchemes;
@@ -252,12 +255,12 @@
   // Merges the ColorSchemeNode into a Map of ColorSchemeNodes, hashed
   // by namespaceURI + name.
   private void _mergeColorScheme(
-    Map      colorSchemes,
+    Map<String, ColorSchemeNode> colorSchemes,
     ColorSchemeNode colorScheme
     )
   {
     String key = colorScheme.getNamespaceURI() + colorScheme.getName();
-    ColorSchemeNode oldColorScheme = (ColorSchemeNode)colorSchemes.get(key);
+    ColorSchemeNode oldColorScheme = colorSchemes.get(key);
 
     if (oldColorScheme == null)
     {
@@ -267,13 +270,15 @@
 
     // If we've already got a color scheme, we need to merge the colors
     // from the new and old color schemes.  Brute force method here...
-    Hashtable colorsTable = new Hashtable();
+    // -= Simon Lessard =-
+    // TODO: Check if synchronization is truly required.
+    Hashtable<String, ColorNode> colorsTable = new Hashtable<String, ColorNode>();
 
     // First, merge in the old colors
-    Iterator e = oldColorScheme.getColors();
+    Iterator<ColorNode> e = oldColorScheme.getColors();
     while (e.hasNext())
     {
-      ColorNode color = (ColorNode)e.next();
+      ColorNode color = e.next();
       colorsTable.put(color.getName(), color);
     }
 
@@ -281,18 +286,16 @@
     e = colorScheme.getColors();
     while (e.hasNext())
     {
-      ColorNode color = (ColorNode)e.next();
+      ColorNode color = e.next();
       colorsTable.put(color.getName(), color);
     }
 
     // Now, create the merged ColorSchemeNode
     ColorNode[] colors = new ColorNode[colorsTable.size()];
-    Iterator values = colorsTable.values().iterator();
     int i = 0;
-    while (values.hasNext())
+    for(ColorNode color : colorsTable.values())
     {
-      colors[i] = (ColorNode)values.next();
-      i++;
+      colors[i++] = color;
     }
 
     ColorSchemeNode newColorScheme = new ColorSchemeNode(
@@ -332,7 +335,7 @@
     if (doc != null)
     {
       if (_imports == null)
-        _imports = new ArrayList();
+        _imports = new ArrayList<StyleSheetDocument>();
 
       _imports.add(doc);
     }
@@ -351,27 +354,30 @@
 
     // If we are the top level document, resolve all <colorProperty>
     // elements now.
-    Map defaultColors = _getDefaultColors(colorSchemes);
+    Map<String, String> defaultColors = _getDefaultColors(colorSchemes);
     for (int i = 0; i < styleSheets.length; i++)
     {
       StyleSheetNode styleSheet = styleSheets[i];
-      Vector stylesVector = new Vector();
-      Iterator stylesIterator = styleSheet.getStyles();
+      // -= Simon Lessard =- 
+      // TODO: Check if synchronization is really needed.
+      Vector<StyleNode> stylesVector = new Vector<StyleNode>();
+      Iterator<StyleNode> stylesIterator = styleSheet.getStyles();
       while (stylesIterator.hasNext())
       {
         boolean resolvedColorProperty = false;
-        StyleNode style = (StyleNode)stylesIterator.next();
-        Vector propertiesVector = new Vector();
-        Iterator propertiesIterator = style.getProperties();
+        StyleNode style = stylesIterator.next();
+        // -= Simon Lessard =- 
+        // TODO: Check if synchronization is really needed.
+        Vector<PropertyNode> propertiesVector = new Vector<PropertyNode>();
+        Iterator<PropertyNode> propertiesIterator = style.getProperties();
         while (propertiesIterator.hasNext())
         {
-          PropertyNode property =
-                         (PropertyNode)propertiesIterator.next();
+          PropertyNode property = propertiesIterator.next();
 
           if (property.__isColorProperty())
           {
             String name = property.getName();
-            String value = (String)defaultColors.get(property.getValue());
+            String value = defaultColors.get(property.getValue());
 
             assert (value != null);
 
@@ -407,9 +413,11 @@
   }
 
   // Returns a Map of color names to (Strings) color values
-  private Map _getDefaultColors(ColorSchemeNode[] colorSchemes)
+  private Map<String, String> _getDefaultColors(ColorSchemeNode[] colorSchemes)
   {
-    Hashtable colors = new Hashtable();
+    // -= Simon Lessard =-
+    // TODO: Check if synchronization is really needed.
+    Hashtable<String, String> colors = new Hashtable<String, String>();
 
     // Initialize the table with default values
     for (int i = 0; i < _DEFAULT_COLORS.length; i += 2)
@@ -423,10 +431,10 @@
         ColorSchemeNode colorScheme = colorSchemes[i];
         if ("default".equals(colorScheme.getName()))
         {
-          Iterator e = colorScheme.getColors();
+          Iterator<ColorNode> e = colorScheme.getColors();
           while (e.hasNext())
           {
-            ColorNode color = (ColorNode)e.next();
+            ColorNode color = e.next();
             colors.put(color.getName(), color.getValue());
           }
 
@@ -451,10 +459,8 @@
     // Tack on versions from imported style sheets
     if (_imports != null)
     {
-      Iterator en = _imports.iterator();
-      while (en.hasNext())
+      for(StyleSheetDocument document : _imports)
       {
-        StyleSheetDocument document = (StyleSheetDocument)en.next();
         String documentVersion = document.getDocumentVersion();
         if (documentVersion != null)
           buffer.append(documentVersion);
@@ -489,10 +495,8 @@
     // Merge in timestamps of imported style sheets
     if (_imports != null)
     {
-      Iterator en = _imports.iterator();
-      while (en.hasNext())
+      for(StyleSheetDocument document : _imports)
       {
-        StyleSheetDocument document = (StyleSheetDocument)en.next();
         long importTimestamp = document.getDocumentTimestamp();
         if (importTimestamp > timestamp)
           timestamp = importTimestamp;
@@ -502,9 +506,11 @@
     return timestamp;
   }
 
-  private Vector _styleSheets;   // Vector of StyleSheetNode
-  private Vector _colorSchemes;  // Vector of ColorSchemeNodes
-  private ArrayList _imports;       // Vector of imported StyleSheetDocument
+  // -= Simon Lessard =-
+  // TODO: Check if synchronization is truly required
+  private Vector<StyleSheetNode> _styleSheets;   // Vector of StyleSheetNode
+  private Vector<ColorSchemeNode> _colorSchemes;  // Vector of ColorSchemeNodes
+  private ArrayList<StyleSheetDocument> _imports;       // Vector of imported StyleSheetDocument
   private String _documentVersion; // Version identifier for the document
 
   // Default values for BLAF color scheme

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNode.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNode.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNode.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNode.java Sun Aug  6 16:12:37 2006
@@ -86,7 +86,8 @@
   /**
    * Implementation of StyleSheetNode.getStyles().
    */
-  public Iterator getStyles()
+  @SuppressWarnings("unchecked")
+  public Iterator<StyleNode> getStyles()
   {
   if(_styles!=null)
   {
@@ -112,7 +113,8 @@
   /**
    * Implementation of StyleSheetNode.getLocales().
    */
-  public Iterator getLocales()
+  @SuppressWarnings("unchecked")
+  public Iterator<Locale> getLocales()
   {
     if (_locales==null) 
     {
@@ -125,7 +127,7 @@
   /**
    * Implementation of StyleSheetNode.getBrowsers().
    */
-  public Iterator getBrowsers()
+  public Iterator<Integer> getBrowsers()
   {
     return Collections.list(new IntegerArrayEnumeration(_browsers)).iterator();
   }
@@ -133,7 +135,7 @@
   /**
    * Implementation of StyleSheetNode.getVersions().
    */
-  public Iterator getVersions()
+  public Iterator<Integer> getVersions()
   {
     return Collections.list(new IntegerArrayEnumeration(_versions)).iterator();
   }
@@ -141,7 +143,7 @@
   /**
    * Implementation of StyleSheetNode.getPlatforms().
    */
-  public Iterator getPlatforms()
+  public Iterator<Integer> getPlatforms()
   {
     return Collections.list(new IntegerArrayEnumeration(_platforms)).iterator();
   }
@@ -196,7 +198,7 @@
     return (localeMatch | browserMatch | versionMatch | osMatch);
   }
 
-  
+  @Override
   public String toString()
   {
     return getClass().getName() + "[" +

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNodeParser.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNodeParser.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNodeParser.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/StyleSheetNodeParser.java Sun Aug  6 16:12:37 2006
@@ -48,6 +48,7 @@
   /**
    * Implementation of NodeParser.startElement()
    */
+  @Override
   public void startElement(
     ParseContext context,
     String       namespaceURI,
@@ -66,6 +67,7 @@
   /**
    * Implementation of NodeParser.endElement()
    */
+  @Override
   public Object endElement(
     ParseContext context,
     String       namespaceURI,
@@ -94,6 +96,7 @@
   /**
    * Implementation of NodeParser.startChildElement()
    */
+  @Override
   public NodeParser startChildElement(
     ParseContext context,
     String       namespaceURI,
@@ -110,6 +113,7 @@
   /**
    * Implementation of NodeParser.addCompletedChild().
    */
+  @Override
   public void addCompletedChild(
     ParseContext context,
     String       namespaceURI,
@@ -120,9 +124,9 @@
     if (child instanceof StyleNode)
     {
       if (_styles == null)
-        _styles = new Vector();
+        _styles = new Vector<StyleNode>();
 
-      _styles.addElement(child);
+      _styles.addElement((StyleNode)child);
     }
   }
 
@@ -149,11 +153,13 @@
     if (localeAttr == null)
       return;
 
-    Vector locales = new Vector();
-    Iterator tokens = _getTokens(localeAttr);
+    // -= Simon Lessard =-
+    // TODO: Check if synchronization is really needed.
+    Vector<Locale> locales = new Vector<Locale>();
+    Iterator<String> tokens = _getTokens(localeAttr);
     while (tokens.hasNext())
     {
-      Locale locale = _getLocale((String)tokens.next());
+      Locale locale = _getLocale(tokens.next());
 
       if (locale != null)
         locales.addElement(locale);
@@ -169,14 +175,16 @@
   // Initialize browsers
   private void _initBrowsers(String browserAttr)
   {
-    Iterator browsers = _getTokens(browserAttr);
+    Iterator<String> browsers = _getTokens(browserAttr);
     if (browsers == null)
       return;
 
-    Vector v = new Vector();
+    // -= Simon Lessard =-
+    // TODO: Check if synchronization is really needed.
+    Vector<Integer> v = new Vector<Integer>();
     while (browsers.hasNext())
     {
-      int browser = NameUtils.getBrowser((String)browsers.next());
+      int browser = NameUtils.getBrowser(browsers.next());
 
       if (browser != TrinidadAgent.APPLICATION_UNKNOWN)
         v.addElement(IntegerUtils.getInteger(browser));
@@ -188,18 +196,20 @@
   // Initialize version
   private void _initVersions(String versionAttr)
   {
-    Iterator versions = _getTokens(versionAttr);
+    Iterator<String> versions = _getTokens(versionAttr);
     if (versions == null)
       return;
 
-    Vector v = new Vector();
+    // -= Simon Lessard =-
+    // TODO: Check if synchronization is really needed.
+    Vector<Integer> v = new Vector<Integer>();
     while (versions.hasNext())
     {
       int version = 0;
 
       try
       {
-        version = Integer.parseInt((String)versions.next());
+        version = Integer.parseInt(versions.next());
       }
       catch (NumberFormatException e)
       {
@@ -216,14 +226,16 @@
   // Initialize platforms
   private void _initPlatforms(String platformAttr)
   {
-    Iterator platforms = _getTokens(platformAttr);
+    Iterator<String> platforms = _getTokens(platformAttr);
     if (platforms == null)
       return;
 
-    Vector v = new Vector();
+    // -= Simon Lessard =-
+    // TODO: Check if synchronization is really needed.
+    Vector<Integer> v = new Vector<Integer>();
     while (platforms.hasNext())
     {
-      String platformName = (String)platforms.next();
+      String platformName = platforms.next();
       int platform = NameUtils.getPlatform(platformName);
 
       // If we didn't find the platform, check for special "unix" platform
@@ -238,7 +250,7 @@
   }
 
   // Copies Integers from a Vector into an int array
-  private int[] _getIntegers(Vector v)
+  private int[] _getIntegers(Vector<Integer> v)
   {
     int count = v.size();
 
@@ -248,13 +260,13 @@
     int[] array = new int[count];
 
     for (int i = 0; i < count; i++)
-      array[i] = ((Integer)v.elementAt(i)).intValue();
+      array[i] = v.elementAt(i).intValue();
 
     return array;
   }
 
   // Converts a NMTOKENS attribute into the individual tokens
-  private Iterator _getTokens(String attr)
+  private Iterator<String> _getTokens(String attr)
   {
     if (attr == null)
       return null;
@@ -262,11 +274,13 @@
     return (Arrays.asList(XMLUtils.parseNameTokens(attr))).iterator();
   }
 
-  private Vector   _styles;
-  private Locale[] _locales;
-  private int      _direction;
-  private int      _mode;
-  private int[]    _browsers;
-  private int[]    _versions;
-  private int[]    _platforms;
+  // -= Simon Lessard =- 
+  // TODO: Check if synchronization is really needed.
+  private Vector<StyleNode> _styles;
+  private Locale[]          _locales;
+  private int               _direction;
+  private int               _mode;
+  private int[]             _browsers;
+  private int[]             _versions;
+  private int[]             _platforms;
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/ValueNodeParser.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/ValueNodeParser.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/ValueNodeParser.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/style/xml/parse/ValueNodeParser.java Sun Aug  6 16:12:37 2006
@@ -35,6 +35,7 @@
   /**
    * Implementation of NodeParser.endElement()
    */
+  @Override
   public Object endElement(
     ParseContext context,
     String       namespaceURI,
@@ -47,6 +48,7 @@
   /**
    * Implementation of NodeParser.addText().
    */
+  @Override
   public void addText(
     ParseContext context,
     char[]       text,

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/AttributeTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/AttributeTag.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/AttributeTag.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/AttributeTag.java Sun Aug  6 16:12:37 2006
@@ -76,6 +76,8 @@
    *
    * @exception JspException if a JSP error occurs
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public int doStartTag() throws JspException 
   {
     // Locate our parent UIComponentTag
@@ -118,6 +120,7 @@
   /**
    * <p>Release references to any acquired resources.
    */
+  @Override
   public void release() 
   {
     super.release();

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentDefTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentDefTag.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentDefTag.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentDefTag.java Sun Aug  6 16:12:37 2006
@@ -38,6 +38,7 @@
     _var = var;
   }
 
+  @Override
   public int doStartTag() throws JspException
   {
     UIComponentTag tag = UIComponentTag.getParentUIComponentTag(pageContext);
@@ -69,6 +70,7 @@
     return EVAL_PAGE;
   }
 
+  @Override
   public void release()
   {
     super.release();

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentRefTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentRefTag.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentRefTag.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ComponentRefTag.java Sun Aug  6 16:12:37 2006
@@ -51,11 +51,13 @@
 {
 
 
+  @Override
   public String getComponentType()
   {
     return "org.apache.myfaces.trinidad.ComponentRef";
   }
 
+  @Override
   public String getRendererType()
   {
     return null;
@@ -72,15 +74,17 @@
    * @param facet the facet that was moved.
    * @param component the component that the facet was moved to.
    */
+  @SuppressWarnings("unchecked")
   public static void addRelocatedFacet(
     UIComponent region,
     String facet,
     UIComponent component)
   {
-    Map map = (Map) region.getAttributes().get(_RELOCATED_FACETS_ATTRIBUTE);
+    Map<String, RelocatedFacet> map = 
+      (Map<String, RelocatedFacet>) region.getAttributes().get(_RELOCATED_FACETS_ATTRIBUTE);
     if (map == null)
     {
-      map = new HashMap(3);
+      map = new HashMap<String, RelocatedFacet>(3);
       region.getAttributes().put(_RELOCATED_FACETS_ATTRIBUTE, map);
     }
 
@@ -100,11 +104,14 @@
     map.put(facet, new RelocatedFacet(component, findId.toString()));
   }
 
+  @SuppressWarnings("unchecked")
+  @Override
   public int doStartTag() throws JspException
   {
     int returnVal = super.doStartTag();
     UIComponent region = getComponentInstance();
-    Map<String,RelocatedFacet> map = (Map) region.getAttributes().get(_RELOCATED_FACETS_ATTRIBUTE);
+    Map<String,RelocatedFacet> map = 
+      (Map<String,RelocatedFacet>) region.getAttributes().get(_RELOCATED_FACETS_ATTRIBUTE);
     if ((map != null) && (!map.isEmpty()))
     {
       // restore all the facets that were moved. Otherwise
@@ -123,6 +130,8 @@
     return returnVal;
   }
 
+  @SuppressWarnings("unchecked")
+  @Override
   public int doEndTag() throws JspException
   {
     UIXComponentRef region = (UIXComponentRef) getComponentInstance();
@@ -185,20 +194,21 @@
     return super.doEndTag();
   }
 
+  @SuppressWarnings("unchecked")
   private boolean _typeConvertAndDefaultAttrs(
     String regionType,
     ComponentMetaData cmd)
   {
     boolean hasErrors = false;
     UIComponent region = getComponentInstance();
-    Map compAttrs = region.getAttributes();
-    List attrs = cmd.getAttributes();
+    Map<String, Object> compAttrs = region.getAttributes();
+    List<AttributeMetaData> attrs = cmd.getAttributes();
     int sz = attrs.size();
     for(int i=0; i<sz; i++)
     {
-      AttributeMetaData attr = (AttributeMetaData) attrs.get(i);
+      AttributeMetaData attr = attrs.get(i);
       String name = attr.getAttrName();
-      Class klass = attr.getAttrClass();
+      Class<?> klass = attr.getAttrClass();
       if (region.getValueBinding(name) != null)
         continue;
 
@@ -229,7 +239,10 @@
     return hasErrors;
   }
 
-  private boolean _typeConvert(Map compAttrs, String name, String value, Class klass)
+  private boolean _typeConvert(
+      Map<String, Object> compAttrs, 
+      String name, String value, 
+      Class<?> klass)
   {
     try
     {
@@ -252,11 +265,11 @@
       // OC4J does not unwrap the following exceptions:
       if (t instanceof JspException)
       {
-        causedBy = ((JspException) t).getRootCause();
+        causedBy = ((JspException) t).getCause();
       }
       else if (t instanceof ServletException)
       {
-        causedBy = ((ServletException) t).getRootCause();
+        causedBy = ((ServletException) t).getCause();
       }
       if ((causedBy == null) || (causedBy == t))
         return t;
@@ -278,6 +291,7 @@
       assert findComponentId != null;
     }
 
+    @SuppressWarnings("unchecked")
     public void restoreFacet(UIComponent region, String facet)
     {
       UIComponent relocatedFacet = _facet;

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ConstantMethodBinding.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ConstantMethodBinding.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ConstantMethodBinding.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ConstantMethodBinding.java Sun Aug  6 16:12:37 2006
@@ -38,12 +38,14 @@
     _o = o;
   }
   
+  @Override
   public Object invoke(FacesContext context, Object[] params)
   {
     return _o;
   }
   
-  public Class getType(FacesContext context)
+  @Override
+  public Class<?> getType(FacesContext context)
   {
     return _o.getClass();
   }

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/FacetRefTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/FacetRefTag.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/FacetRefTag.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/FacetRefTag.java Sun Aug  6 16:12:37 2006
@@ -43,6 +43,7 @@
     _facet = f;
   }
 
+  @Override
   public int doStartTag() throws JspException
   {
     UIComponentTag tag = UIComponentTag.getParentUIComponentTag(pageContext);
@@ -80,6 +81,7 @@
     return SKIP_BODY;
   }
 
+  @Override
   public void release()
   {
     super.release();
@@ -88,6 +90,7 @@
 
   // adds the given child to the given parent as either a facet or a
   // direct child.
+  @SuppressWarnings("unchecked")
   private void _addChild(UIComponent parent, UIComponent child)
   {
     String facet = _getParentFacetName();

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ForEachTag.java Sun Aug  6 16:12:37 2006
@@ -18,10 +18,8 @@
 import java.lang.reflect.Array;
 
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
-import java.util.Map.Entry;
 
 import javax.faces.context.FacesContext;
 import javax.faces.el.ValueBinding;
@@ -100,6 +98,7 @@
     _varStatus = varStatus;
   }
 
+  @Override
   public int doStartTag() throws JspException
   {
     _validateAttributes();
@@ -173,7 +172,7 @@
     if (null != _varStatus)
     {
       _updateLoopStatus();
-      _propertyReplacementMap = new HashMap(9, 1);
+      _propertyReplacementMap = new HashMap<String, Object>(9, 1);
       _propertyReplacementMap.put("begin", new Integer(_currentBegin));
       _propertyReplacementMap.put("end", new Integer(_currentEnd));
       _propertyReplacementMap.put("step", new Integer(_currentStep));
@@ -196,6 +195,7 @@
     return EVAL_BODY_INCLUDE;
   }
 
+  @Override
   public int doAfterBody()
   {
     _currentIndex += _currentStep;
@@ -258,7 +258,7 @@
     StringBuffer buf = new StringBuffer(expression.length());
     while(tokens.hasNext())
     {
-      Token tok = (Token) tokens.next();
+      Token tok = tokens.next();
       String exp = tok.getText();
       if (tok.type == Tokenizer.VAR_TYPE)
       {
@@ -299,6 +299,7 @@
   /**
    * Release state.
    */
+  @Override
   public void release()
   {
     super.release();
@@ -348,6 +349,7 @@
     if (_currentStep < 1)
       throw new JspTagException("'step' < 1");
   }
+  
   private String _transformExpression(String expression)
   {
     boolean doVar = (_var != null);
@@ -361,7 +363,7 @@
     String varStatusDot = _varStatus+".";
     while(tokens.hasNext())
     {
-      Token tok = (Token) tokens.next();
+      Token tok = tokens.next();
       String text = tok.getText();
       if (tok.type == Tokenizer.VAR_TYPE)
       {
@@ -391,21 +393,18 @@
     String subExpression,
     String variable,
     String variableReplacement,
-    Map propertyReplacementMap)
+    Map<String, Object> propertyReplacementMap)
   {
     int variableLength = variable.length();
     //pu: Now check whether the variable is followed by any property from
     //  the supplied map.
     if (null != propertyReplacementMap)
     {
-      Iterator propertySetIterator =
-        propertyReplacementMap.entrySet().iterator();
       String property;
       String propertyReplacement;
-      while(propertySetIterator.hasNext())
+      for(Map.Entry<String, Object> entry : propertyReplacementMap.entrySet())
       {
-        Entry entry = (Entry) propertySetIterator.next();
-        property = (String) entry.getKey();
+        property = entry.getKey();
         String expressionAfterVar = subExpression.substring(variableLength);
         if (expressionAfterVar.startsWith("."+property))
         {
@@ -516,7 +515,7 @@
   private String _var;
   private String _varStatus;
   //pu: Map for properties referred off from 'varStatus' and their replacements
-  private Map _propertyReplacementMap;
+  private Map<String, Object> _propertyReplacementMap;
   //pu: Represents replacement for 'var' upon every iteration
   private String _varReplacement;
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ValidatorTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ValidatorTag.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ValidatorTag.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/ValidatorTag.java Sun Aug  6 16:12:37 2006
@@ -58,6 +58,7 @@
     _binding = binding;
   }
 
+  @Override
   public int doStartTag() throws JspException
   {
     UIComponentTag tag =
@@ -92,6 +93,7 @@
   /**
    * Release state.
    */
+  @Override
   public void release()
   {
     super.release();

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/convert/ConvertIntegerTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/convert/ConvertIntegerTag.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/convert/ConvertIntegerTag.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/convert/ConvertIntegerTag.java Sun Aug  6 16:12:37 2006
@@ -32,6 +32,7 @@
   {
   }
 
+  @Override
   public int doStartTag() throws JspException
   {
     super.setConverterId(IntegerConverter.CONVERTER_ID);
@@ -41,13 +42,11 @@
   /**
    * 
    */
+  @Override
   protected Converter createConverter() throws JspException
   {
     IntegerConverter converter =
                               (IntegerConverter)super.createConverter();
     return converter;
   }
-
-
-
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListener.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListener.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListener.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListener.java Sun Aug  6 16:12:37 2006
@@ -78,13 +78,14 @@
     return previous;
   }
 
+  @SuppressWarnings("unchecked")
   private void _resetChildren(UIComponent comp)
   {
-    Iterator kids = comp.getFacetsAndChildren();
+    Iterator<UIComponent> kids = comp.getFacetsAndChildren();
 
     while (kids.hasNext())
     {
-      UIComponent kid = (UIComponent) kids.next();
+      UIComponent kid = kids.next();
       
       if (kid instanceof UIXEditableValue)
       {

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListenerTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListenerTag.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListenerTag.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ResetActionListenerTag.java Sun Aug  6 16:12:37 2006
@@ -29,6 +29,7 @@
  */
 public class ResetActionListenerTag extends TagSupport
 {
+  @Override
   public int doStartTag() throws JspException
   {
     UIComponentTag tag = UIComponentTag.getParentUIComponentTag(pageContext);
@@ -56,6 +57,7 @@
     return super.doStartTag();
   }
 
+  @Override
   public void release()
   {
     super.release();

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListener.java Sun Aug  6 16:12:37 2006
@@ -60,6 +60,7 @@
     setProperty(VALUE_KEY, value);
   }
 
+  @Override
   public Type getType()
   {
     return TYPE;

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListenerTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListenerTag.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListenerTag.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/ReturnActionListenerTag.java Sun Aug  6 16:12:37 2006
@@ -40,7 +40,7 @@
     _value = value;
   }
 
-
+  @Override
   public int doStartTag() throws JspException
   {
     UIComponentTag tag = UIComponentTag.getParentUIComponentTag(pageContext);
@@ -89,6 +89,7 @@
     return super.doStartTag();
   }
 
+  @Override
   public void release()
   {
     super.release();

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListener.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListener.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListener.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListener.java Sun Aug  6 16:12:37 2006
@@ -93,6 +93,7 @@
     setProperty(FROM_KEY, from);
   }
 
+  @Override
   public Type getType()
   {
     return TYPE;

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListenerTag.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListenerTag.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListenerTag.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/listener/SetActionListenerTag.java Sun Aug  6 16:12:37 2006
@@ -47,7 +47,7 @@
     _to = to;
   }
 
-
+  @Override
   public int doStartTag() throws JspException
   {
     UIComponentTag tag = UIComponentTag.getParentUIComponentTag(pageContext);
@@ -83,7 +83,7 @@
         if (parentELContext != null)
           from = parentELContext.transformExpression(from);
 
-        listener.setValueBinding(listener.FROM_KEY,
+        listener.setValueBinding(SetActionListener.FROM_KEY,
                                  application.createValueBinding(from));
       }
       else
@@ -97,7 +97,7 @@
         if (parentELContext != null)
           to = parentELContext.transformExpression(to);
 
-        listener.setValueBinding(listener.TO_KEY,
+        listener.setValueBinding(SetActionListener.TO_KEY,
                                  application.createValueBinding(to));
       }
       else
@@ -112,6 +112,7 @@
     return super.doStartTag();
   }
 
+  @Override
   public void release()
   {
     super.release();

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/util/TagUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/util/TagUtils.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/util/TagUtils.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/taglib/util/TagUtils.java Sun Aug  6 16:12:37 2006
@@ -162,17 +162,17 @@
    *  java.util.List of java.awt.Color objects and returns it.
    * @throws ParseException In case of any parse errors upon such conversion.
    */
-  public static List getColorList(String value) throws ParseException
+  public static List<Color> getColorList(String value) throws ParseException
   {
     String[] tokenArray = _getTokensArray(value);
     if (tokenArray == null)
       return null;
 
     String colorCode;
-    List colorList = new ArrayList();
+    List<Color> colorList = new ArrayList<Color>();
     for (int index=0; index < tokenArray.length; index++)
     {
-      colorCode = (String)tokenArray[index];
+      colorCode = tokenArray[index];
 
       //pu: If we do not have correct starter, stop here
       if (!colorCode.startsWith("#"))

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/expl/ColorPaletteUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/expl/ColorPaletteUtils.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/expl/ColorPaletteUtils.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/ui/expl/ColorPaletteUtils.java Sun Aug  6 16:12:37 2006
@@ -21,6 +21,7 @@
 import java.util.AbstractMap;
 import java.util.Arrays;
 import java.util.Collections;
+import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
@@ -35,7 +36,7 @@
  */
 public class ColorPaletteUtils
 {
-  public static Map getColorPaletteMap()
+  public static Map<String, List<Color>> getColorPaletteMap()
   {
     return _PALETTE_MAP;
   }
@@ -531,16 +532,21 @@
   // The Map of color palette names to color palettes.
   // Use the same technique for creating an unmodifiable
   // Map that we use for the Maps in UIImplicitObject.
-  private static final Map _PALETTE_MAP = new AbstractMap()
+  private static final Map<String, List<Color>> _PALETTE_MAP = 
+    new AbstractMap<String, List<Color>>()
   {
-    public Set entrySet()
+    @SuppressWarnings("unchecked")
+    @Override
+    public Set<Map.Entry<String, List<Color>>> entrySet()
     {
       return Collections.EMPTY_SET;
     }
 
-    public Object get(Object key)
+    @SuppressWarnings("unchecked")
+    @Override
+    public List<Color> get(Object key)
     {
-      return ArrayMap.get(_PALETTE_ARRAY, key);
+      return (List<Color>)ArrayMap.get(_PALETTE_ARRAY, key);
     }
   };
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/FormattedTextParser.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/FormattedTextParser.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/FormattedTextParser.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/FormattedTextParser.java Sun Aug  6 16:12:37 2006
@@ -45,6 +45,7 @@
    */
   public FormattedTextParser()
   {
+    _elements = new HashMap<String, ElementInfo>(23);
   }
 
   /**
@@ -69,7 +70,8 @@
   {
     int length = text.length();
 
-    ArrayList elementStack = new ArrayList(10);
+    ArrayList<ElementInfo> elementStack = 
+      new ArrayList<ElementInfo>(10);
 
     // Constant for current parsing state
     int state = _OUT_OF_ELEMENT;
@@ -107,8 +109,7 @@
 
             // Find out information about this element;  in particular,
             // is this an allowed element?
-            ElementInfo info =
-                      (ElementInfo) _elements.get(elementName);
+            ElementInfo info = _elements.get(elementName);
 
             // Allowed elements.
             if (info != null)
@@ -304,7 +305,7 @@
     int size = elementStack.size() - 1;
     while (size >= 0)
     {
-      ElementInfo info = (ElementInfo) elementStack.get(size);
+      ElementInfo info = elementStack.get(size);
       info.endElement(context);
       // These _should_ all be elements that do not require being closed.
       if (info.isCloseRequired())
@@ -317,15 +318,15 @@
   // Push an element onto the stack.  Close elements
   // if needed.
   static private void _pushElement(
-    FacesContext context,
-    ArrayList        elementStack,
-    ElementInfo      element) throws IOException
+    FacesContext           context,
+    ArrayList<ElementInfo> elementStack,
+    ElementInfo            element) throws IOException
   {
     int size = elementStack.size();
 
     if (size != 0)
     {
-      ElementInfo top = (ElementInfo) elementStack.get(size - 1);
+      ElementInfo top = elementStack.get(size - 1);
 
       // If we were working on a "no-close" element, and starting
       // exactly the same element, close it off now.
@@ -342,27 +343,27 @@
   // Look at the top element on the stack (null if the stack
   // is empty)
   static private ElementInfo _peekElement(
-    ArrayList    elementStack)
+    ArrayList<ElementInfo> elementStack)
   {
     int size = elementStack.size();
     if (size == 0)
       return null;
 
-    return (ElementInfo) elementStack.get(size - 1);
+    return elementStack.get(size - 1);
   }
 
 
   // Pop an element from the stack.  Close elements if needed.
   static private boolean _popElement(
-    FacesContext context,
-    ArrayList        elementStack,
-    ElementInfo      element) throws IOException
+    FacesContext           context,
+    ArrayList<ElementInfo> elementStack,
+    ElementInfo            element) throws IOException
   {
     int size;
 
     while ((size = elementStack.size()) > 0)
     {
-      ElementInfo top = (ElementInfo) elementStack.remove(size - 1);
+      ElementInfo top = elementStack.remove(size - 1);
       // We've reached the correct element
       if (element == top)
       {
@@ -672,37 +673,42 @@
       _closeRequired = closeRequired;
     }
 
+    @Override
     public void startElement(FacesContext context)
        throws IOException
     {
       context.getResponseWriter().startElement(getName(), null);
     }
 
+    @Override
     public void endElement(FacesContext context)
        throws IOException
     {
       context.getResponseWriter().endElement(getName());
     }
 
+    @Override
     public void writeInlineStyle(
       FacesContext context, String style) throws IOException
     {
       context.getResponseWriter().writeAttribute("style", style, null);
     }
 
+    @Override
     public void writeStyleClass(
       FacesContext context, String styleClass) throws IOException
     {
       context.getResponseWriter().writeAttribute("class", styleClass, null);
     }
 
+    @Override
     public void writeSize(FacesContext context, String fontSize)
       throws IOException
     {
       //no-op. This is for the FontElement only.
     }
 
-
+    @Override
     public void writeHRef(
       FacesContext context, String href) throws IOException
     {
@@ -720,12 +726,13 @@
         context.getResponseWriter().writeURIAttribute("href", href, null);
     }
 
-
+    @Override
     public boolean isEmptyElement()
     {
       return _empty;
     }
 
+    @Override
     public boolean isCloseRequired()
     {
       return _closeRequired;
@@ -738,7 +745,7 @@
 
   // Map of all the allowed elements;  maps input element
   // names to ElementInfo objects
-  private HashMap _elements = new HashMap(23);
+  private HashMap<String, ElementInfo> _elements;
 
 
   // Parsing state constants



Mime
View raw message