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 [14/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/util/JavaIntrospector.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/JavaIntrospector.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/JavaIntrospector.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/JavaIntrospector.java Sun Aug  6 16:12:37 2006
@@ -116,7 +116,7 @@
    *              introspection.
    */
   public static BeanInfo getBeanInfo(
-    Class beanClass
+    Class<?> beanClass
     ) throws IntrospectionException
   {
     // first look for the bean info in the cache
@@ -161,8 +161,8 @@
    *              introspection.
    */
   public static BeanInfo getBeanInfo(
-    Class beanClass,
-    int   flags
+    Class<?> beanClass,
+    int      flags
     ) throws IntrospectionException
   {
     // if they want all of the bean info, call the caching version of this
@@ -193,8 +193,8 @@
    *              introspection.
    */
   public static BeanInfo getBeanInfo(
-    Class beanClass,
-    Class stopClass
+    Class<?> beanClass,
+    Class<?> stopClass
     ) throws IntrospectionException
   {
     // if they don't want to stop at any class, call the caching version of this
@@ -301,7 +301,7 @@
    */
 
   public static void flushFromCaches(
-    Class targetClass
+    Class<?> targetClass
     )
   {
     _sBeanInfoCache.remove(targetClass);
@@ -314,8 +314,8 @@
   //======================================================================
 
   private JavaIntrospector(
-    Class beanClass,
-    Class stopClass,
+    Class<?> beanClass,
+    Class<?> stopClass,
     int   flags
     ) throws IntrospectionException
   {
@@ -326,7 +326,7 @@
     {
       boolean isSuper = false;
 
-      for (Class c = beanClass.getSuperclass();
+      for (Class<?> c = beanClass.getSuperclass();
            c != null;
            c = c.getSuperclass())
       {
@@ -351,7 +351,7 @@
       _informant = _findInformant(beanClass);
     }
 
-    Class superClass = beanClass.getSuperclass();
+    Class<?> superClass = beanClass.getSuperclass();
 
     if (superClass != stopClass)
     {
@@ -369,7 +369,7 @@
       {
         // We avoid going through getBeanInfo as we don't need
         // it to copy the BeanInfo.
-        _superBeanInfo = (BeanInfo)_sBeanInfoCache.get(superClass);
+        _superBeanInfo = _sBeanInfoCache.get(superClass);
 
         if (_superBeanInfo == null)
         {
@@ -414,7 +414,7 @@
    * have left around for us
    */
   private BeanInfo _findInformant(
-    Class beanClass
+    Class<?> beanClass
     )
   {
     String name = beanClass.getName() + "BeanInfo";
@@ -477,7 +477,10 @@
   {
 
     // properties maps from String names to PropertyDescriptors
-    Hashtable properties = new Hashtable();
+    // -= Simon Lessard =-
+    // TODO: Check if synchronization is really needed.
+    Hashtable<String, PropertyDescriptor> properties = 
+      new Hashtable<String, PropertyDescriptor>();
 
     // Check if the bean has its own BeanInfo that will provide
     // explicit information.
@@ -572,9 +575,9 @@
           continue;
         }
 
-        String name      = method.getName();
-        Class argTypes[] = method.getParameterTypes();
-        Class resultType = method.getReturnType();
+        String     name       = method.getName();
+        Class<?>[] argTypes   = method.getParameterTypes();
+        Class<?>   resultType = method.getReturnType();
 
         int argCount = argTypes.length;
 
@@ -695,7 +698,7 @@
     //
     // prune the list of properties, removing bogusly introspected properties.
     //
-    Enumeration elements = properties.elements();
+    Enumeration<PropertyDescriptor> elements = properties.elements();
 
     while (elements.hasMoreElements())
     {
@@ -734,7 +737,7 @@
 
     for (int i = 0; i < result.length; i++)
     {
-      result[i] = (PropertyDescriptor)elements.nextElement();
+      result[i] = elements.nextElement();
 
       if ((_defaultPropertyName != null) &&
           _defaultPropertyName.equals(result[i].getName()))
@@ -752,8 +755,8 @@
    * is a conflict.
    */
   private void _addProperty(
-    Hashtable          properties,
-    PropertyDescriptor newDescriptor
+    Hashtable<String, PropertyDescriptor> properties,
+    PropertyDescriptor                    newDescriptor
     )
   {
     //
@@ -767,8 +770,7 @@
     //
     String name = newDescriptor.getName();
 
-    PropertyDescriptor oldDescriptor =
-                                     (PropertyDescriptor)properties.get(name);
+    PropertyDescriptor oldDescriptor = properties.get(name);
 
     //
     // A descriptor with this name is already in the cache, so determine
@@ -779,8 +781,8 @@
       //
       // If the property type hasn't changed we need to merge the descriptors.
       //
-      Class oldDescriptorType = oldDescriptor.getPropertyType();
-      Class newDescriptorType = newDescriptor.getPropertyType();
+      Class<?> oldDescriptorType = oldDescriptor.getPropertyType();
+      Class<?> newDescriptorType = newDescriptor.getPropertyType();
 
       if (!((oldDescriptorType != newDescriptorType) &&
             (oldDescriptorType != null)              &&
@@ -828,7 +830,10 @@
   {
 
     // events maps from String names to EventSetDescriptors
-    Hashtable events = new Hashtable();
+    // -= Simon Lessard =-
+    // TODO: Check if synchronization is really needed.
+    Hashtable<String, EventSetDescriptor> events = 
+      new Hashtable<String, EventSetDescriptor>();
 
     // Check if the bean has its own BeanInfo that will provide
     // explicit information.
@@ -893,8 +898,10 @@
       Method methodList[] = _getPublicMethods(_beanClass);
 
       // Find all suitable "add" and "remove" methods.
-      Hashtable adds    = new Hashtable();
-      Hashtable removes = new Hashtable();
+      // -= Simon Lessard =-
+      // TODO: Check if synchronization is really needed.
+      Hashtable<String, Method> adds    = new Hashtable<String, Method>();
+      Hashtable<String, Method> removes = new Hashtable<String, Method>();
 
       for (int i = 0; i < methodList.length; i++)
       {
@@ -910,8 +917,8 @@
 
         String name = method.getName();
 
-        Class argTypes[] = method.getParameterTypes();
-        Class resultType = method.getReturnType();
+        Class<?>[] argTypes   = method.getParameterTypes();
+        Class<?>   resultType = method.getReturnType();
 
         if (name.startsWith("add") &&
             (argTypes.length == 1) &&
@@ -930,11 +937,11 @@
       }
 
       // Now look for matching addFooListener+removeFooListener pairs.
-      Enumeration keys = adds.keys();
+      Enumeration<String> keys = adds.keys();
 
       while (keys.hasMoreElements())
       {
-        String compound = (String)keys.nextElement();
+        String compound = keys.nextElement();
 
         // Skip any "add" which doesn't have a matching "remove".
         if (removes.get(compound) == null)
@@ -952,9 +959,9 @@
         String eventName    = decapitalize(
                              listenerName.substring(0,
                                                     listenerName.length() - 8));
-        Method addMethod    = (Method)adds.get(compound);
-        Method removeMethod = (Method)removes.get(compound);
-        Class  argType      = addMethod.getParameterTypes()[0];
+        Method   addMethod    = adds.get(compound);
+        Method   removeMethod = removes.get(compound);
+        Class<?> argType      = addMethod.getParameterTypes()[0];
 
         // Check if the argument type is a subtype of EventListener
         if (!JavaIntrospector._isSubclass(argType, _EVENT_LISTENER_TYPE))
@@ -1009,12 +1016,12 @@
     }
 
     // Allocate and populate the result array.
-    EventSetDescriptor result[] = new EventSetDescriptor[events.size()];
-    Enumeration        elements = events.elements();
+    EventSetDescriptor[]            result   = new EventSetDescriptor[events.size()];
+    Enumeration<EventSetDescriptor> elements = events.elements();
 
     for (int i = 0; i < result.length; i++)
     {
-      result[i] = (EventSetDescriptor)elements.nextElement();
+      result[i] = elements.nextElement();
 
       if ((_defaultEventName != null)
           && _defaultEventName.equals(result[i].getName()))
@@ -1028,7 +1035,7 @@
 
 
   private void _addEvent(
-    Hashtable          events,
+    Hashtable<String, EventSetDescriptor> events,
     EventSetDescriptor descriptor
     )
   {
@@ -1039,7 +1046,7 @@
       _propertyChangeSource = true;
     }
 
-    EventSetDescriptor oldDescriptor = (EventSetDescriptor)events.get(key);
+    EventSetDescriptor oldDescriptor = events.get(key);
 
     if (oldDescriptor == null)
     {
@@ -1067,7 +1074,10 @@
 
     // hash table to associate the method objects with their method
     // descriptors
-    Hashtable methods = new Hashtable();
+    // -= Simon Lessard =-
+    // TODO: Check if synchronization is really needed.
+    Hashtable<String, MethodDescriptor> methods = 
+      new Hashtable<String, MethodDescriptor>();
 
     if (_informant != null)
     {
@@ -1124,11 +1134,11 @@
     // Allocate and populate the result array.
     MethodDescriptor result[] = new MethodDescriptor[methods.size()];
 
-    Enumeration elements = methods.elements();
+    Enumeration<MethodDescriptor> elements = methods.elements();
 
     for (int i = 0; i < result.length; i++)
     {
-      result[i] = (MethodDescriptor)elements.nextElement();
+      result[i] = elements.nextElement();
     }
 
     return result;
@@ -1136,7 +1146,7 @@
 
 
   private void _addMethod(
-    Hashtable        methods,
+    Hashtable<String, MethodDescriptor> methods,
     MethodDescriptor descriptor
     )
   {
@@ -1145,7 +1155,7 @@
     // This method gets called a *lot, so we try to be efficient.
     String name = descriptor.getMethod().getName();
 
-    MethodDescriptor old = (MethodDescriptor)methods.get(name);
+    MethodDescriptor old = methods.get(name);
 
     if (old == null)
     {
@@ -1186,7 +1196,7 @@
     // This is very rare.
     String longKey = _makeQualifiedMethodName(descriptor);
 
-    old = (MethodDescriptor)methods.get(longKey);
+    old = methods.get(longKey);
 
     if (old == null)
     {
@@ -1281,12 +1291,12 @@
    * Return all of the public methods for the target class
    */
   private static synchronized Method[] _getPublicMethods(
-    Class targetClass
+    Class<?> targetClass
     )
   {
     // Looking up Class.getMethods is relatively expensive,
     // so we cache the results.
-    Method[] declaredMethods = (Method[])_sPublicMethodCache.get(targetClass);
+    Method[] declaredMethods = _sPublicMethodCache.get(targetClass);
 
     //
     // if the declared methods aren't in the cache, generate them and stuff
@@ -1344,7 +1354,9 @@
         //
         if (numDeclaredMethods > 0)
         {
-          Vector publicMethods = new Vector(numDeclaredMethods);
+          // -= Simon Lessard =-
+          // TODO: Check if synchronization is really needed.
+          Vector<Method> publicMethods = new Vector<Method>(numDeclaredMethods);
 
           for (int i = 0; i < numDeclaredMethods; i++)
           {
@@ -1383,15 +1395,18 @@
   /**
    * Internal support for finding a target methodName on a given class.
    */
+  // -= Simon Lessard
+  // FIXME: Never used locally
+  @SuppressWarnings("unused")
   private static Method _internalFindMethod(
-    Class  start,
-    String methodName,
-    int    argCount
+    Class<?> start,
+    String   methodName,
+    int      argCount
     )
   {
     // For overriden methods we need to find the most derived version.
     // So we start with the given class and walk up the superclass chain.
-    for (Class cl = start; cl != null; cl = cl.getSuperclass())
+    for (Class<?> cl = start; cl != null; cl = cl.getSuperclass())
     {
       Method methods[] = _getPublicMethods(cl);
 
@@ -1440,8 +1455,8 @@
    * Note tht either or both "Class" objects may represent interfaces.
    */
   static  boolean _isSubclass(
-    Class a,
-    Class b
+    Class<?> a,
+    Class<?> b
     )
   {
     // We rely on the fact that for any given java class or
@@ -1457,7 +1472,7 @@
       return false;
     }
 
-    for (Class x = a; x != null; x = x.getSuperclass())
+    for (Class<?> x = a; x != null; x = x.getSuperclass())
     {
       if (x == b)
       {
@@ -1487,7 +1502,7 @@
    */
   private boolean _throwsException(
     Method method,
-    Class exception
+    Class<?> exception
     )
   {
     Class exs[] = method.getExceptionTypes();
@@ -1510,8 +1525,8 @@
    * classloader.
    */
   private static Object _instantiate(
-    Class  sibling,
-    String className
+    Class<?> sibling,
+    String   className
     ) throws InstantiationException,
              IllegalAccessException,
              ClassNotFoundException
@@ -1523,7 +1538,7 @@
     {
       try
       {
-        Class cls = cl.loadClass(className);
+        Class<?> cls = cl.loadClass(className);
 
         return cls.newInstance();
       }
@@ -1535,7 +1550,7 @@
     }
 
     // Now try the system classloader.
-    Class cls = ClassLoaderUtils.loadClass(className);
+    Class<?> cls = ClassLoaderUtils.loadClass(className);
     return cls.newInstance();
   }
 
@@ -1852,7 +1867,7 @@
     //
     // merge the property editor class
     //
-    Class editorClass = primaryDescriptor.getPropertyEditorClass();
+    Class<?> editorClass = primaryDescriptor.getPropertyEditorClass();
 
     // Give priority to the primary propertyEditor.
     if (editorClass == null)
@@ -1947,13 +1962,13 @@
     FeatureDescriptor destinationDescriptor
     )
   {
-    Enumeration keys = addingDescriptor.attributeNames();
+    Enumeration<String> keys = addingDescriptor.attributeNames();
 
     if (keys != null)
     {
       while (keys.hasMoreElements())
       {
-        String key = (String)keys.nextElement();
+        String key = keys.nextElement();
         Object value = addingDescriptor.getValue(key);
         destinationDescriptor.setValue(key, value);
       }
@@ -1964,7 +1979,7 @@
 
 //===========================================================================
 
-  private static final Class _EVENT_LISTENER_TYPE = EventListener.class;
+  private static final Class<EventListener> _EVENT_LISTENER_TYPE = EventListener.class;
   private static final String _READ_PREFIX = "get";
   private static final String _WRITE_PREFIX = "set";
   private static final String[] _BOOLEAN_READ_PREFIXES = {"is", "has"};
@@ -1972,7 +1987,7 @@
   private boolean _propertyChangeSource = false;
 
   // clas of object that we are building the BeanInfo of
-  private Class _beanClass;
+  private Class<?> _beanClass;
 
   // the BeanInof of the bean class' is superClass
   private BeanInfo _superBeanInfo;
@@ -1988,10 +2003,14 @@
   private int _defaultPropertyIndex = -1;
 
   // cache mapping classes to their BeanInfos
-  private static Hashtable _sBeanInfoCache = new Hashtable();
+  private static Hashtable<Class<?>, BeanInfo> _sBeanInfoCache = 
+    new Hashtable<Class<?>, BeanInfo>();
 
   // Cache of public Class.getDeclaredMethods:
-  private static Hashtable _sPublicMethodCache = new Hashtable();
+  // -= Simon Lessard =-
+  // TODO: Check if synchronization is really needed.
+  private static Hashtable<Class<?>, Method[]> _sPublicMethodCache = 
+    new Hashtable<Class<?>, Method[]>();
 
   // true if SecurityManager will give us access to all declared fields
   // of the class.
@@ -2031,7 +2050,7 @@
     _targetBeanInfo = old._targetBeanInfo;
   }
 
-
+  @Override
   public PropertyDescriptor[] getPropertyDescriptors()
   {
     if (_properties == null)
@@ -2087,6 +2106,7 @@
     return _properties;
   }
 
+  @Override
   public int getDefaultPropertyIndex()
   {
     if (_defaultProperty == _DEFAULT_VALUE)
@@ -2099,6 +2119,7 @@
     return _defaultProperty;
   }
 
+  @Override
   public EventSetDescriptor[] getEventSetDescriptors()
   {
     if (_events == null)
@@ -2148,7 +2169,7 @@
     return _events;
   }
 
-
+  @Override
   public int getDefaultEventIndex()
   {
     if (_defaultEvent == _DEFAULT_VALUE)
@@ -2161,7 +2182,7 @@
     return _defaultEvent;
   }
 
-
+  @Override
   public MethodDescriptor[] getMethodDescriptors()
   {
     if (_methods == null)
@@ -2200,6 +2221,7 @@
     return _methods;
   }
 
+  @Override
   public BeanDescriptor getBeanDescriptor()
   {
     if (_beanDescriptor == null)
@@ -2226,6 +2248,7 @@
     return _beanDescriptor;
   }
 
+  @Override
   public Image getIcon(
     int iconKind
     )

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/LRUCache.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/LRUCache.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/LRUCache.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/LRUCache.java Sun Aug  6 16:12:37 2006
@@ -27,7 +27,7 @@
  * <p>
  * @author The Oracle ADF Faces Team
  */
-public class LRUCache extends LinkedHashMap
+public class LRUCache<K, V> extends LinkedHashMap<K, V>
 {
   public LRUCache(int maxSize)
   {
@@ -39,7 +39,8 @@
   {
   }
 
-  protected boolean removeEldestEntry(Map.Entry eldest)
+  @Override
+  protected boolean removeEldestEntry(Map.Entry<K, V> eldest)
   {
     if (size() > _maxSize)
     {

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/MessageUtils.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/MessageUtils.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/MessageUtils.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/MessageUtils.java Sun Aug  6 16:12:37 2006
@@ -41,16 +41,17 @@
 {
   private MessageUtils(){}
 
+  @SuppressWarnings("unchecked")
   public static FacesMessage getFacesMessage(
     FacesContext context,
     String       clientId)
   {
     if (clientId != null)
     {
-      Iterator messages = context.getMessages(clientId);
+      Iterator<FacesMessage> messages = context.getMessages(clientId);
       if (messages.hasNext())
       {
-        return (FacesMessage) messages.next();
+        return messages.next();
       }
     }
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/OptimisticHashMap.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/OptimisticHashMap.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/OptimisticHashMap.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/OptimisticHashMap.java Sun Aug  6 16:12:37 2006
@@ -17,12 +17,11 @@
 
 import java.util.AbstractMap;
 import java.util.Enumeration;
+import java.util.Map;
 import java.util.NoSuchElementException;
 import java.util.Set;
 
 
-
-
 /**
  * A Map implementation that behaves like a Hashtable
  * with optimistic synchronization of gets.
@@ -40,7 +39,7 @@
  * @version $Name:  $ ($Revision: adfrt/faces/adf-faces-impl/src/main/java/oracle/adfinternal/view/faces/util/OptimisticHashMap.java#0 $) $Date: 10-nov-2005.19:56:01 $
  * @author The Oracle ADF Faces Team
  */
-public class OptimisticHashMap extends AbstractMap implements Cloneable
+public class OptimisticHashMap<K, V> extends AbstractMap<K, V> implements Cloneable
 {
   /**
    * Constructs a new, empty OptimisticHashMap with the specified initial
@@ -51,6 +50,7 @@
    * @exception  IllegalArgumentException  if the initial capacity is less
    *             than zero, or if the load factor is nonpositive.
    */
+  @SuppressWarnings("unchecked")
   public OptimisticHashMap(
     int   initialCapacity,
     float loadFactor
@@ -99,7 +99,8 @@
   /**
    *
    */
-  public Set entrySet()
+  @Override
+  public Set<Map.Entry<K, V>> entrySet()
   {
     throw new UnsupportedOperationException("entrySet not supported for OptimisticHashMap");
   }
@@ -109,6 +110,7 @@
    *
    * @return  the number of keys in this hashtable.
    */
+  @Override
   public int size()
   {
     return _entryCount;
@@ -120,6 +122,7 @@
    * @return  <code>true</code> if this hashtable maps no keys to values;
    *          <code>false</code> otherwise.
    */
+  @Override
   public boolean isEmpty()
   {
     return (_entryCount == 0);
@@ -131,9 +134,9 @@
    * @return  an enumeration of the keys in this hashtable.
    * @see     Enumeration
    */
-  public synchronized Enumeration keys()
+  public synchronized Enumeration<K> keys()
   {
-    return new Enumerator(true);
+    return new KeyEnumerator();
   }
 
   /**
@@ -145,9 +148,9 @@
    * @see     java.util.Enumeration
    * @see     #keys()
    */
-  public synchronized Enumeration elements()
+  public synchronized Enumeration<V> elements()
   {
-    return new Enumerator(false);
+    return new ValueEnumerator();
   }
 
 
@@ -173,11 +176,11 @@
       throw new NullPointerException();
     }
 
-    Entry[] bins = _bins;
+    Entry<K, V>[] bins = _bins;
 
     for (int i = bins.length ; i-- > 0 ;)
     {
-      for (Entry entry = bins[i] ; entry != null ; entry = entry.next)
+      for (Entry<K, V> entry = bins[i] ; entry != null ; entry = entry.next)
       {
         if (value.equals(entry.value))
         {
@@ -195,7 +198,7 @@
 
       for (int i = bins.length ; i-- > 0 ;)
       {
-        for (Entry entry = bins[i] ; entry != null ; entry = entry.next)
+        for (Entry<K, V> entry = bins[i] ; entry != null ; entry = entry.next)
         {
           if (value.equals(entry.value))
           {
@@ -218,6 +221,7 @@
    *          <tt>equals</tt> method; <code>false</code> otherwise.
    * @see     #contains(Object)
    */
+  @Override
   public boolean containsKey(
     Object key
     )
@@ -234,20 +238,21 @@
    *          this hashtable.
    * @see     #put(Object, Object)
    */
-  public Object get(
+  @Override
+  public V get(
     Object key
     )
   {
     if (key == null)
       throw new IllegalArgumentException();
 
-    int     hash  = key.hashCode();
-    Entry[] bins  = _bins;
-    int     index = (hash & 0x7FFFFFFF) % bins.length;
+    int           hash  = key.hashCode();
+    Entry<K, V>[] bins  = _bins;
+    int           index = (hash & 0x7FFFFFFF) % bins.length;
 
-    Object result = null;
+    V result = null;
 
-    for (Entry entry = bins[index]; entry != null ; entry = entry.next)
+    for (Entry<K, V> entry = bins[index]; entry != null ; entry = entry.next)
     {
       if ((entry.hash == hash) && key.equals(entry.key))
       {
@@ -266,7 +271,7 @@
         bins  = _bins;
         index = (hash & 0x7FFFFFFF) % bins.length;
 
-        for (Entry entry = bins[index]; entry != null ; entry = entry.next)
+        for (Entry<K, V> entry = bins[index]; entry != null ; entry = entry.next)
         {
           if ((hash == entry.hash) && key.equals(entry.key))
           {
@@ -286,9 +291,10 @@
    * number of keys in the hashtable exceeds this hashtable's capacity
    * and load factor.
    */
+  @SuppressWarnings("unchecked")
   protected void rehash()
   {
-    Entry[] oldBins = _bins;
+    Entry<K, V>[] oldBins = _bins;
     int oldCapacity = oldBins.length;
 
     // detemine the percentage of of the load that was real entries
@@ -306,7 +312,7 @@
       //
       // we have a lot of empty entries, so increase the capacity by
       // the empty factor
-      newCapacity = (int)(((double)oldCapacity) * (1.0 / realFactor) + 1.0);
+      newCapacity = (int)(oldCapacity * (1.0 / realFactor) + 1.0);
 
       // make sure that the new bin size is at least odd
       if ((newCapacity & 1) == 1)
@@ -316,14 +322,14 @@
     }
 
     // allocate the new bins
-    Entry[] newBins = new Entry[newCapacity];
+    Entry<K, V>[] newBins = new Entry[newCapacity];
 
     // calculate the new load factor
     _threshold = (int)(newCapacity * _loadFactor);
 
     for (int i = oldCapacity ; i-- > 0 ;)
     {
-      for (Entry oldEntry = oldBins[i];
+      for (Entry<K, V> oldEntry = oldBins[i];
           oldEntry != null;
           oldEntry = oldEntry.next)
       {
@@ -335,10 +341,10 @@
 
           // create a new entry instance of the new entry to avoid hosing
           // unsynchronized readers
-          Entry newEntry = new Entry(oldEntry.hash,
-                                     oldEntry.key,
-                                     oldEntry.value,
-                                     newBins[newBinIndex]);
+          Entry<K, V> newEntry = new Entry<K, V>(oldEntry.hash,
+                                                 oldEntry.key,
+                                                 oldEntry.value,
+                                                 newBins[newBinIndex]);
 
 
           // add the entry to the front of the correct bin
@@ -371,9 +377,10 @@
    * @see     Object#equals(Object)
    * @see     #get(Object)
    */
-  public synchronized Object put(
-    Object key,
-    Object value
+  @Override
+  public synchronized V put(
+    K key,
+    V value
     )
   {
     // make sure that the key isn't null
@@ -389,15 +396,15 @@
     //
     // Check if the key is already in the Hashtable
     //
-    Entry[] bins  = _bins;
-    int     hash  = key.hashCode();
-    int     index = (hash & 0x7FFFFFFF) % bins.length;
+    Entry<K, V>[] bins  = _bins;
+    int           hash  = key.hashCode();
+    int           index = (hash & 0x7FFFFFFF) % bins.length;
 
-    for (Entry entry = bins[index] ; entry != null; entry = entry.next)
+    for (Entry<K, V> entry = bins[index] ; entry != null; entry = entry.next)
     {
       if ((entry.hash == hash) && key.equals(entry.key))
       {
-        Object returnValue = entry.value;
+        V returnValue = entry.value;
 
         // assign the new value
         entry.value = value;
@@ -420,7 +427,7 @@
     }
 
     // Creates the new entry
-    bins[index] = new Entry(hash, key, value, bins[index]);
+    bins[index] = new Entry<K, V>(hash, key, value, bins[index]);
     _entryCount++;
     _realCount++;
 
@@ -435,7 +442,8 @@
    * @return  the value to which the key had been mapped in this hashtable,
    *          or <code>null</code> if the key did not have a mapping.
    */
-  public synchronized Object remove(
+  @Override
+  public synchronized V remove(
     Object key
     )
   {
@@ -446,15 +454,15 @@
     //
     // Check if the key is already in the Hashtable
     //
-    Entry[] bins  = _bins;
-    int     hash  = key.hashCode();
-    int     index = (hash & 0x7FFFFFFF) % bins.length;
+    Entry<K, V>[] bins  = _bins;
+    int           hash  = key.hashCode();
+    int           index = (hash & 0x7FFFFFFF) % bins.length;
 
-    for (Entry entry = bins[index] ; entry != null; entry = entry.next)
+    for (Entry<K, V> entry = bins[index] ; entry != null; entry = entry.next)
     {
       if ((entry.hash == hash) && key.equals(entry.key))
       {
-        Object returnValue = entry.value;
+        V returnValue = entry.value;
 
         // mark the entry as removed
         entry.value = null;
@@ -474,6 +482,8 @@
   /**
    * Clears this hashtable so that it contains no keys.
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public synchronized void clear()
   {
     // reset the count of the number of entries
@@ -494,22 +504,25 @@
    *
    * @return  a clone of the hashtable.
    */
+  @SuppressWarnings("unchecked")
+  @Override
   public synchronized Object clone()
   {
     try
     {
-      OptimisticHashMap newHashtable = (OptimisticHashMap)super.clone();
+      OptimisticHashMap<K, V> newHashtable = 
+        (OptimisticHashMap<K, V>)super.clone();
 
-      Entry[] oldBins = newHashtable._bins;
-      Entry[] newBins = new Entry[oldBins.length];
+      Entry<K, V>[] oldBins = newHashtable._bins;
+      Entry<K, V>[] newBins = new Entry[oldBins.length];
 
       for (int i = newBins.length ; i-- > 0 ;)
       {
-        Entry currBin = oldBins[i];
+        Entry<K, V> currBin = oldBins[i];
 
         // clone the list of bins (Entry does this for us)
         newBins[i] = ((currBin != null) && (currBin.value != null))
-                       ? (Entry)currBin.clone()
+                       ? (Entry<K, V>)currBin.clone()
                        : null;
       }
 
@@ -540,6 +553,7 @@
    *
    * @return  a string representation of this hashtable.
    */
+  @Override
   public String toString()
   {
     //
@@ -549,7 +563,7 @@
     //
     StringBuffer buff = new StringBuffer();
 
-    Enumeration keys = keys();
+    Enumeration<K> keys = keys();
 
     buff.append('{');
 
@@ -641,18 +655,18 @@
    * Hashtable collision list.
    *
    */
-  private static class Entry implements Cloneable
+  private static class Entry<K, V> implements Cloneable
   {
-    int    hash;
-    Object key;
-    Object value;
-    Entry  next;
+    int         hash;
+    K           key;
+    V           value;
+    Entry<K, V> next;
 
     protected Entry(
-      int    hash,
-      Object key,
-      Object value,
-      Entry  next
+      int         hash,
+      K           key,
+      V           value,
+      Entry<K, V> next
       )
     {
       this.hash  = hash;
@@ -662,43 +676,37 @@
     }
 
     // clone the entire entry chain
+    @Override
     protected Object clone()
     {
       //
       // Don't clone any chains to empty entrys
       //
-      Entry nextEntry = next;
+      Entry<K, V> nextEntry = next;
 
       while ((nextEntry != null) && (nextEntry.value == null))
       {
         nextEntry = nextEntry.next;
       }
 
-      return new Entry(hash, key, value, nextEntry);
+      return new Entry<K, V>(hash, key, value, nextEntry);
     }
   }
-
-  /**
-   * A hashtable enumerator class.  This implementation tries to return almost
-   * all of the request keys or values, but may not
-   */
-  private class Enumerator implements Enumeration
+  
+  private abstract class BaseEnumerator<T> implements Enumeration<T>
   {
-    public Enumerator(
-      boolean returnKeys
-      )
+    public BaseEnumerator()
     {
-      _returnKeys = returnKeys;
-
       // get a reference to the current bins to avoid
-      _bins = OptimisticHashMap.this._bins;
       _binIndex = _bins.length;
     }
 
     public boolean hasMoreElements()
     {
       if (_currEntry != null)
+      {
         return true;
+      }
       else
       {
         while (_binIndex-- > 0)
@@ -706,7 +714,7 @@
           _currEntry = _bins[_binIndex];
 
           // skip the empty entries that haven't been removed yet
-          while ((_currEntry != null) && (_currEntry.value == null))
+          while (_currEntry != null && _currEntry.value == null)
           {
             _currEntry = _currEntry.next;
           }
@@ -720,8 +728,8 @@
 
       return false;
     }
-
-    public Object nextElement()
+    
+    public T nextElement()
     {
       if (_currEntry == null)
       {
@@ -731,35 +739,50 @@
         }
       }
 
-      Entry result = _currEntry;
+      Entry<K, V> result = _currEntry;
 
       _currEntry = _currEntry.next;
 
       // skip the empty entries that haven't been removed yet
-      while ((_currEntry != null) && (_currEntry.value == null))
+      while (_currEntry != null && _currEntry.value == null)
       {
         _currEntry = _currEntry.next;
       }
 
-      if (_returnKeys)
-      {
-        return result.key;
-      }
-      else
-      {
-        return result.value;
-      }
+      return getData(result);
+      
     }
+    
+    protected abstract T getData(Entry<K, V> entry);
 
-    private Entry[] _bins;
-    private Entry _currEntry;
-    private int _binIndex;
+    private Entry<K, V> _currEntry;
+    private int         _binIndex;
+  }
 
-    private boolean _returnKeys;
+  /**
+   * A hashtable enumerator class.  This implementation tries to return almost
+   * all of the request keys or values, but may not
+   */
+  private class KeyEnumerator extends BaseEnumerator<K>
+  {
+    @Override
+    protected K getData(Entry<K, V> entry)
+    {
+      return entry.key;
+    }
+  }
+  
+  private class ValueEnumerator extends BaseEnumerator<V>
+  {
+    @Override
+    protected V getData(Entry<K, V> entry)
+    {
+      return entry.value;
+    }
   }
 
   // The hash table data.
-  private transient Entry _bins[];
+  private transient Entry<K, V>[] _bins;
 
   // The total number of entries in the hash table.
   private transient int _entryCount;

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/TokenCache.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/TokenCache.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/TokenCache.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/TokenCache.java Sun Aug  6 16:12:37 2006
@@ -19,8 +19,6 @@
 import java.io.ObjectInputStream;
 import java.io.Serializable;
 
-import java.util.Collections;
-import java.util.Iterator;
 import java.util.Map;
 
 import javax.faces.context.ExternalContext;
@@ -45,6 +43,7 @@
   /**
    * Gets a TokenCache from the session, creating it if needed.
    */
+  @SuppressWarnings("unchecked")
   static public TokenCache getTokenCacheFromSession(
     FacesContext context,
     String       cacheName,
@@ -112,7 +111,9 @@
    * Create a new token;  and use that token to store a value into
    * a target Map.
    */
-  public String addNewEntry(Object value, Map targetStore)
+  public String addNewEntry(
+      Object value, 
+      Map<String, Object> targetStore)
   {
     Object remove = null;
     String token = null;
@@ -150,7 +151,9 @@
    * Removes a value from the cache.
    * @return previous value associated with the token, if any
    */
-  public Object removeOldEntry(String token, Map targetStore)
+  public Object removeOldEntry(
+      String token, 
+      Map<String, Object> targetStore)
   {
     synchronized (this)
     {
@@ -163,14 +166,12 @@
   /**
    * Clear a cache, without resetting the token.
    */
-  public void clear(Map targetStore)
+  public void clear(Map<String, Object> targetStore)
   {
     synchronized (this)
     {
-      Iterator keys = _cache.keySet().iterator();
-      while (keys.hasNext())
+      for(String keyToRemove : _cache.keySet())
       {
-        Object keyToRemove = keys.next();
         _LOG.finest("Clearing token {0} from cache", keyToRemove);
         targetStore.remove(keyToRemove);
       }
@@ -196,20 +197,21 @@
     _lock = new Object();
   }
 
-  private class LRU extends LRUCache
+  private class LRU extends LRUCache<String, String>
   {
     public LRU(int maxSize)
     {
       super(maxSize);
     }
 
+    @Override
     protected void removing(Object key)
     {
       _removed = key;
     }
   }
 
-  private final Map _cache;
+  private final Map<String, String> _cache;
   private int      _count;
   private transient Object   _lock = new Object();
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/ByteLengthValidator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/ByteLengthValidator.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/ByteLengthValidator.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/ByteLengthValidator.java Sun Aug  6 16:12:37 2006
@@ -203,9 +203,9 @@
   // Unsupported type - perform validation on the server only
   static private final int _UNSUPPORTED_TYPE = 3;
 
-  static private Set _cjkEncodings = new HashSet();
+  static private Set<String> _cjkEncodings = new HashSet<String>();
 
-  static private Set _singleByteEncodings = new HashSet();
+  static private Set<String> _singleByteEncodings = new HashSet<String>();
 
   static
   {

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/DateTimeRangeValidator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/DateTimeRangeValidator.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/DateTimeRangeValidator.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/DateTimeRangeValidator.java Sun Aug  6 16:12:37 2006
@@ -28,6 +28,7 @@
   {
   }
 
+  @Override
   public void validate(
     FacesContext context,
     UIComponent  component,

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/LongRangeValidator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/LongRangeValidator.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/LongRangeValidator.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/LongRangeValidator.java Sun Aug  6 16:12:37 2006
@@ -36,9 +36,7 @@
 public class LongRangeValidator extends javax.faces.validator.LongRangeValidator
                                 implements InternalClientValidator
 {
-
-
-
+  @Override
   public void validate(
     FacesContext context,
     UIComponent component,
@@ -145,6 +143,7 @@
    * @param maximum The new maximum value
    *
    */
+  @Override
   public void setMaximum(long maximum)
   {
     super.setMaximum(maximum);
@@ -158,12 +157,14 @@
    * @param minimum The new minimum value
    *
    */
+  @Override
   public void setMinimum(long minimum)
   {
     super.setMinimum(minimum);
     _minimumSet = true;
   }
 
+  @Override
   public Object saveState(FacesContext context)
   {
     Object values[] = new Object[2];
@@ -177,7 +178,7 @@
     return (values);
   }
 
-
+  @Override
   public void restoreState(FacesContext context, Object state)
   {
     Object values[] = (Object[]) state;

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/RegExpValidator.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/RegExpValidator.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/RegExpValidator.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/validator/RegExpValidator.java Sun Aug  6 16:12:37 2006
@@ -154,6 +154,9 @@
                                                 noMatchDetMsg);
   }
 
+  // -= Simon Lessard =-
+  // TODO: Nothing is logged in this class as of 2006-08-04
+  @SuppressWarnings("unused")
   private static final TrinidadLogger _LOG  = TrinidadLogger.createTrinidadLogger(
      RegExpValidator.class);
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/ConfigParser.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/ConfigParser.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/ConfigParser.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/ConfigParser.java Sun Aug  6 16:12:37 2006
@@ -97,32 +97,32 @@
     }
 
     String className = (String)
-      bean.getProperty(bean.UPLOADED_FILE_PROCESSOR_KEY);
+      bean.getProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY);
     if (className != null)
     {
       className = className.trim();
 
       try
       {
-        Class clazz = ClassLoaderUtils.loadClass(className);
-        bean.setProperty(bean.UPLOADED_FILE_PROCESSOR_KEY,
+        Class<?> clazz = ClassLoaderUtils.loadClass(className);
+        bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                          clazz.newInstance());
       }
       catch (Exception e)
       {
         _LOG.severe("Could not instantiate UploadedFileProcessor", e);
-        bean.setProperty(bean.UPLOADED_FILE_PROCESSOR_KEY,
+        bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                          new UploadedFileProcessorImpl());
       }
     }
     else
     {
-      bean.setProperty(bean.UPLOADED_FILE_PROCESSOR_KEY,
+      bean.setProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY,
                        new UploadedFileProcessorImpl());
     }
 
     UploadedFileProcessor ufp = (UploadedFileProcessor)
-      bean.getProperty(bean.UPLOADED_FILE_PROCESSOR_KEY);
+      bean.getProperty(RequestContextBean.UPLOADED_FILE_PROCESSOR_KEY);
 
     ufp.init(context);
 
@@ -144,6 +144,7 @@
       _bean = bean;
     }
 
+    @Override
     public void startElement(String uri,
                              String localName,
                              String qName,
@@ -152,12 +153,14 @@
       _currentText = "";
     }
 
+    @Override
     public void characters(char[] ch, int start, int length)
     {
       if (_currentText != null)
         _currentText = _currentText + new String(ch, start, length);
     }
 
+    @Override
     public void endElement(String uri,
                            String localName,
                            String qName)

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/DispatchServletResponse.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/DispatchServletResponse.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/DispatchServletResponse.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/DispatchServletResponse.java Sun Aug  6 16:12:37 2006
@@ -34,6 +34,7 @@
     _request = request;
   }
 
+  @Override
   public void setContentType(
     String contentTypeAndCharset)
   {
@@ -64,10 +65,11 @@
     super.setContentType(contentTypeAndCharset);
   }
   
+  @SuppressWarnings("unchecked")
   static public String getContentType(
     FacesContext context)
   {
-    Map requestMap = context.getExternalContext().getRequestMap();
+    Map<String, Object> requestMap = context.getExternalContext().getRequestMap();
     return (String) requestMap.get(_CONTENT_TYPE_KEY);
   }
   

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/LazyValueBinding.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/LazyValueBinding.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/LazyValueBinding.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/LazyValueBinding.java Sun Aug  6 16:12:37 2006
@@ -69,26 +69,31 @@
     _expression = expression;
   }
 
+  @Override
   public Object getValue(FacesContext context)
   {
     return _getValueBinding().getValue(context);
   }
 
+  @Override
   public void setValue(FacesContext context, Object value)
   {
     _getValueBinding().setValue(context, value);
   }
 
+  @Override
   public boolean isReadOnly(FacesContext context)
   {
     return _getValueBinding().isReadOnly(context);
   }
 
-  public Class getType(FacesContext context)
+  @Override
+  public Class<?> getType(FacesContext context)
   {
     return _getValueBinding().getType(context);
   }
 
+  @Override
   public String getExpressionString()
   {
     return _expression;

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/PseudoFacesContext.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/PseudoFacesContext.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/PseudoFacesContext.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/PseudoFacesContext.java Sun Aug  6 16:12:37 2006
@@ -62,96 +62,115 @@
                              (HttpServletResponse) response);
   }
 
+  @Override
   public ResponseWriter getResponseWriter()
   {
     throw new UnsupportedOperationException();
   }
 
+  @Override
   public void setResponseWriter(ResponseWriter responseWriter)
   {
     throw new UnsupportedOperationException();
   }
 
-  public Iterator getMessages()
+  @Override
+  public Iterator<FacesMessage> getMessages()
   {
     throw new UnsupportedOperationException();
   }
 
-  public Iterator getMessages(String id)
+  @Override
+  public Iterator<FacesMessage> getMessages(String id)
   {
     throw new UnsupportedOperationException();
   }
 
+  @Override
   public void addMessage(String id, FacesMessage message)
   {
     throw new UnsupportedOperationException();
   }
 
+  @Override
   public FacesMessage.Severity getMaximumSeverity()
   {
     throw new UnsupportedOperationException();
   }
 
-  public Iterator getClientIdsWithMessages()
+  @Override
+  public Iterator<String> getClientIdsWithMessages()
   {
     throw new UnsupportedOperationException();
   }
 
+  @Override
   public Application getApplication()
   {
     throw new UnsupportedOperationException();
   }
 
+  @Override
   public UIViewRoot getViewRoot()
   {
     throw new UnsupportedOperationException();
   }
 
+  @Override
   public void setViewRoot(UIViewRoot viewRoot)
   {
      throw new UnsupportedOperationException();
   }
 
+  @Override
   public ExternalContext getExternalContext()
   {
     return _external;
   }
 
+  @Override
   public RenderKit getRenderKit()
   {
      throw new UnsupportedOperationException();
   }
 
+  @Override
   public boolean getRenderResponse()
   {
     throw new UnsupportedOperationException();
   }
 
+  @Override
   public boolean getResponseComplete()
   {
     throw new UnsupportedOperationException();
   }
 
+  @Override
   public ResponseStream getResponseStream()
   {
     throw new UnsupportedOperationException();
   }
   
+  @Override
   public void setResponseStream(ResponseStream responseStream)
   {
     throw new UnsupportedOperationException();
   }
 
+  @Override
   public void release()
   {
     throw new UnsupportedOperationException();
   }
 
+  @Override
   public void renderResponse()
   {
     throw new UnsupportedOperationException();
   }
   
+  @Override
   public void responseComplete()
   {
     throw new UnsupportedOperationException();
@@ -171,15 +190,21 @@
     }
     
     // Can't very well have a ServletContext before a servlet!!!
+    @Override
     public Object getContext() { throw new UnsupportedOperationException(); }
+    @Override
     public Object getRequest() { return _request; }
+    @Override
     public Object getResponse() { return _response; }
+    @Override
     public Object getSession(boolean create)
     {
       return _request.getSession(create);
     }
 
-    public Map getSessionMap()
+    @SuppressWarnings("unchecked")
+    @Override
+    public Map<String, Object> getSessionMap()
     {
       Object o = getSession(true);
       if (o == null)
@@ -188,147 +213,180 @@
       return new SessionMap((HttpSession) o);
     }
 
-
+    @Override
     public String getRequestContextPath()
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public String getRequestServletPath()
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public String getInitParameter(String name)
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public String encodeResourceURL(String url)
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public String encodeActionURL(String url)
     {
       throw new UnsupportedOperationException();
     }
 
-    public Map getRequestMap()
+    @Override
+    public Map<String, Object> getRequestMap()
     {
       throw new UnsupportedOperationException();
     }
 
-    public Map getApplicationMap()
+    @Override
+    public Map<String, Object> getApplicationMap()
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public void dispatch(String path)
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public String encodeNamespace(String name)
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public String getAuthType()
     {
       throw new UnsupportedOperationException();
     }
 
+    // -= Simon Lessard =- 
+    // FIXME: Odd... JSF 1.2 does not give generics type for this map
+    @SuppressWarnings("unchecked")
+    @Override
     public Map getInitParameterMap()
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public String getRemoteUser()
     {
       throw new UnsupportedOperationException();
     }
 
-    public Map getRequestCookieMap()
+    @Override
+    public Map<String, Object> getRequestCookieMap()
     {
       throw new UnsupportedOperationException();
     }
     
-    public Map getRequestHeaderMap()
+    @Override
+    public Map<String, String> getRequestHeaderMap()
     {
       throw new UnsupportedOperationException();
     }
 
-    public Map getRequestHeaderValuesMap()
+    @Override
+    public Map<String, String[]> getRequestHeaderValuesMap()
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public Locale getRequestLocale()
     {
       throw new UnsupportedOperationException();
     }
     
-    public Iterator getRequestLocales()
+    @Override
+    public Iterator<Locale> getRequestLocales()
     {
       throw new UnsupportedOperationException();
     }
 
-    public Map getRequestParameterMap()
+    @Override
+    public Map<String, String> getRequestParameterMap()
     {
       return new ParameterMap(_request);
     }
 
-    public Iterator getRequestParameterNames()
+    @SuppressWarnings("unchecked")
+    @Override
+    public Iterator<String> getRequestParameterNames()
     {
       return _request.getParameterMap().keySet().iterator();
     }
 
-    public Map getRequestParameterValuesMap()
+    @SuppressWarnings("unchecked")
+    @Override
+    public Map<String, String[]> getRequestParameterValuesMap()
     {
       return _request.getParameterMap();
     }
 
+    @Override
     public String getRequestPathInfo()
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public URL getResource(String path)
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public InputStream getResourceAsStream(String path)
     {
       throw new UnsupportedOperationException();
     }
 
-    public Set getResourcePaths(String path)
+    @Override
+    public Set<String> getResourcePaths(String path)
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public Principal getUserPrincipal()
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public boolean isUserInRole(String role)
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public void log(String message)
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public void log(String message, Throwable exception)
     {
       throw new UnsupportedOperationException();
     }
 
+    @Override
     public void redirect(String url)
     {
       throw new UnsupportedOperationException();
@@ -338,19 +396,21 @@
     private HttpServletResponse _response;
   }
 
-  private static final class ParameterMap extends AbstractMap
+  private static final class ParameterMap extends AbstractMap<String, String>
   {
     public ParameterMap(ServletRequest request)
     {
       _request = request;
     }
     
-    public Object get(Object key)
+    @Override
+    public String get(Object key)
     {
       return _request.getParameter((String) key);
     }
         
-    public Set entrySet()
+    @Override
+    public Set<Map.Entry<String, String>> entrySet()
     {
       throw new UnsupportedOperationException();
     }
@@ -358,25 +418,28 @@
     private ServletRequest _request;
   }
 
-  private static final class SessionMap extends AbstractMap
+  private static final class SessionMap extends AbstractMap<String, Object>
   {
     public SessionMap(HttpSession session)
     {
       _session = session;
     }
     
+    @Override
     public Object get(Object key)
     {
       return _session.getAttribute((String) key);
     }
     
-    public Object put(Object key, Object value)
+    @Override
+    public Object put(String key, Object value)
     {
-      Object old = _session.getAttribute((String) key);
-      _session.setAttribute((String) key, value);
+      Object old = _session.getAttribute(key);
+      _session.setAttribute(key, value);
       return old;
     }
     
+    @Override
     public Object remove(Object key)
     {
       Object old = _session.getAttribute((String) key);
@@ -384,7 +447,8 @@
       return old;
     }
     
-    public Set entrySet()
+    @Override
+    public Set<Map.Entry<String, Object>> entrySet()
     {
       throw new UnsupportedOperationException();
     }

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/ReplaceParametersRequestWrapper.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/ReplaceParametersRequestWrapper.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/ReplaceParametersRequestWrapper.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/ReplaceParametersRequestWrapper.java Sun Aug  6 16:12:37 2006
@@ -25,18 +25,20 @@
 public class ReplaceParametersRequestWrapper extends HttpServletRequestWrapper
 {
   public ReplaceParametersRequestWrapper(
-    HttpServletRequest request,
-    Map                parameters)
+    HttpServletRequest    request,
+    Map<String, String[]> parameters)
   {
     super(request);
     _parameters = parameters;
   }
 
+  @Override
   public void setCharacterEncoding(String encoding)
   {
     // Do nothing
   }
 
+  @Override
   public String getParameter(String param)
   {
     String[] value = _getParameterValues(param);
@@ -46,29 +48,32 @@
     return value[0];
   }
 
-  public Map getParameterMap()
+  @Override
+  public Map<String, String[]> getParameterMap()
   {
     return Collections.unmodifiableMap(_parameters);
   }
 
-  public Enumeration getParameterNames()
+  @Override
+  public Enumeration<String> getParameterNames()
   {
     return Collections.enumeration(_parameters.keySet());
   }
 
+  @Override
   public String[] getParameterValues(String param)
   {
     String[] value = _getParameterValues(param);
     if (value == null)
       return null;
 
-    return (String[]) value.clone();
+    return value.clone();
   }
 
   private String[] _getParameterValues(String param)
   {
-    return (String[]) _parameters.get(param);
+    return _parameters.get(param);
   }
 
-  private Map _parameters;
+  private Map<String, String[]> _parameters;
 }

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/TrinidadFilterImpl.java Sun Aug  6 16:12:37 2006
@@ -75,7 +75,7 @@
 
   static public FacesContext getPseudoFacesContext()
   {
-    return (FacesContext) _PSEUDO_FACES_CONTEXT.get();
+    return _PSEUDO_FACES_CONTEXT.get();
   }
 
   /**
@@ -154,6 +154,7 @@
     _filters = null;
   }
 
+  @SuppressWarnings("unchecked")
   public void doFilter(
     ServletRequest  request,
     ServletResponse response,
@@ -218,7 +219,7 @@
         mfh.setMaximumAllowedBytes(getMaximumAllowedBytes());
         mfh.setCharacterEncoding(request.getCharacterEncoding());
 
-        HashMap parameters = new HashMap();
+        HashMap<String, String[]> parameters = new HashMap<String, String[]>();
 
         // Copy over all parameters that were already present (for example,
         // query parameters)
@@ -274,6 +275,7 @@
   }
 
 
+  @SuppressWarnings("unchecked")
   private void _doFilterImpl(
     ServletRequest  request,
     ServletResponse response,
@@ -292,7 +294,12 @@
     // we've returned from a "launch", and we need to re-execute the
     // faces lifecycle.  ViewHandlerImpl will be responsible for ensuring
     // that we re-execute the lifecycle on the correct page.
-    Map launchParameters = (Map)
+    // -= Simon Lessard =-
+    // FIXME: Using <String, String[]> for now to accomodate ReplaceParametersRequestWrapper.
+    //        However, the Servlet specification suggest <String, Object> so this 
+    //        could lead to some nasty problems one day. Especially if JEE spec includes 
+    //        generics for its Servlet API soon.
+    Map<String, String[]> launchParameters = (Map<String, String[]>)
       request.getAttribute(RequestContextImpl.LAUNCH_PARAMETERS);
     if (launchParameters != null)
     {
@@ -321,7 +328,7 @@
     }
     finally
     {
-      _PSEUDO_FACES_CONTEXT.set(null);
+      _PSEUDO_FACES_CONTEXT.remove();
     }
   }
 
@@ -361,8 +368,9 @@
       _request = request;
     }
 
+    @Override
     public void sendRedirect(String location)
-      throws java.io.IOException
+      throws IOException
     {
       // We're only interested in redirects from partial events
       Object partial = _request.getParameter("partial");
@@ -475,9 +483,11 @@
   private static final String _IFRAME_REDIRECT_FINISH
     = "';</script></html>";
 
-  private static ThreadLocal _PSEUDO_FACES_CONTEXT = new ThreadLocal()
+  private static ThreadLocal<PseudoFacesContext> _PSEUDO_FACES_CONTEXT = 
+    new ThreadLocal<PseudoFacesContext>()
   {
-    protected Object initialValue() { return (null); }
+    @Override
+    protected PseudoFacesContext initialValue() { return null; }
   };
 
   private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(TrinidadFilterImpl.class);

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/UploadRequestWrapper.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/UploadRequestWrapper.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/UploadRequestWrapper.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/UploadRequestWrapper.java Sun Aug  6 16:12:37 2006
@@ -19,7 +19,6 @@
 
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.Map;
 import java.util.Enumeration;
 
@@ -40,7 +39,9 @@
  */
 class UploadRequestWrapper extends HttpServletRequestWrapper
 {
-  public UploadRequestWrapper(HttpServletRequest request, Map extractedParams)
+  public UploadRequestWrapper(
+      HttpServletRequest request, 
+      Map<String, String[]> extractedParams)
   {
     super(request);
     _extractedParams = extractedParams;
@@ -50,6 +51,7 @@
    * Hide the content type so that no one tries to re-download the
    * uploaded files.
    */
+  @Override
   public String getContentType()
   {
     return _WWW_FORM_URLENCODED_TYPE;
@@ -58,6 +60,7 @@
   /**
    * Trap calls to setCharacterEncoding() to decode parameters correctly
    */
+  @Override
   public void setCharacterEncoding(String encoding)
     throws UnsupportedEncodingException
   {
@@ -65,18 +68,17 @@
     if (_LOG.isFine())
       _LOG.fine("Switching encoding of wrapper to " + encoding);
 
-    _extractedAndDecodedParams = new HashMap(_extractedParams.size());
-    Iterator entries = _extractedParams.entrySet().iterator();
-
+    _extractedAndDecodedParams = 
+      new HashMap<String, String[]>(_extractedParams.size());
+      
     byte[] buffer = new byte[256];
-
-    while (entries.hasNext())
+    
+    for(Map.Entry<String, String[]> entry : _extractedParams.entrySet())
     {
-      Map.Entry entry = (Map.Entry) entries.next();
-      String key = (String) entry.getKey();
+      String key = entry.getKey();
       key = CaboHttpUtils.decodeRequestParameter(key, encoding, buffer);
 
-      String[] oldValue = (String[]) entry.getValue();
+      String[] oldValue = entry.getValue();
       int length = oldValue.length;
       String[] newValue = new String[length];
       for (int i = 0; i < length; i++)
@@ -95,6 +97,7 @@
     UploadedFiles.setCharacterEncoding(this, encoding);
   }
 
+  @Override
   public String getParameter(String param)
   {
     String[] value = _getParameterValues(param);
@@ -104,36 +107,39 @@
     return value[0];
   }
 
-  public Map getParameterMap()
+  @Override
+  public Map<String, String[]> getParameterMap()
   {
-    Map map = _getMap();
+    Map<String, String[]> map = _getMap();
     return Collections.unmodifiableMap(map);
   }
 
-  public Enumeration getParameterNames()
+  @Override
+  public Enumeration<String> getParameterNames()
   {
     return Collections.enumeration(_getMap().keySet());
   }
 
+  @Override
   public String[] getParameterValues(String param)
   {
     String[] value = _getParameterValues(param);
     if (value == null)
       return null;
 
-    return (String[]) value.clone();
+    return value.clone();
   }
 
   private String[] _getParameterValues(String param)
   {
-    return (String[]) _getMap().get(param);
+    return _getMap().get(param);
   }
 
   /**
    * Get the correct map of parameters whether or not setCharacterEncoding()
    * was called.
    */
-  private Map _getMap()
+  private Map<String, String[]> _getMap()
   {
     if (_extractedAndDecodedParams != null)
       return _extractedAndDecodedParams;
@@ -141,8 +147,8 @@
     return _extractedParams;
   }
 
-  private Map _extractedAndDecodedParams;
-  private Map _extractedParams;
+  private Map<String, String[]> _extractedAndDecodedParams;
+  private Map<String, String[]> _extractedParams;
 
   private static final TrinidadLogger _LOG = TrinidadLogger.createTrinidadLogger(UploadRequestWrapper.class);
   private static final String _WWW_FORM_URLENCODED_TYPE =

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/UploadedFileImpl.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/UploadedFileImpl.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/UploadedFileImpl.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/UploadedFileImpl.java Sun Aug  6 16:12:37 2006
@@ -101,7 +101,7 @@
       int size = _buffers.size();
       for (int i = 0; i < size; i++)
       {
-        byte[] buffer = (byte[]) _buffers.get(i);
+        byte[] buffer = _buffers.get(i);
         int bytes;
         if (i == (size - 1))
           bytes = _sizeOfLastBuffer;
@@ -179,7 +179,7 @@
       _length           = _length + bytes;
 
       if (_buffers == null)
-        _buffers = new ArrayList();
+        _buffers = new ArrayList<byte[]>();
       _buffers.add(buffer);
       
       // If we're done, bail right here.
@@ -237,8 +237,8 @@
       }
     }
   }
-
-
+  
+  @Override
   public int hashCode()
   {
     if (_filename == null)
@@ -246,6 +246,7 @@
     return _filename.hashCode();
   }
 
+  @Override
   public boolean equals(Object o)
   {
     // UploadedFiles are only equal to themselves.
@@ -316,14 +317,14 @@
   //
   static private class BufferIS extends InputStream
   {
-    public BufferIS(List bufferList, int sizeOfLastBuffer)
+    public BufferIS(List<byte[]> bufferList, int sizeOfLastBuffer)
     {
       _bufferList = bufferList;
       _sizeOfLastBuffer = sizeOfLastBuffer;
     }
 
-    
     // Read a single byte.
+    @Override
     public int read()
     {
       int bufferIndex = _bufferIndex;
@@ -339,8 +340,8 @@
       return currByte & 0xff; 
     }
     
-
     // Read into a buffer.
+    @Override
     public int read(byte b[], int off, int len)
     {
       int bufferIndex = _bufferIndex;
@@ -367,6 +368,7 @@
     // Returns the number of bytes that will be made avaialable
     // in the next call to read(byte[], int, int);
     //
+    @Override
     public int available()
     {
       int bufferIndex = _bufferIndex;
@@ -408,11 +410,11 @@
     // Return a buffer.
     private byte[] _getBuffer(int bufferIndex)
     {
-      return (byte[]) _bufferList.get(bufferIndex);
+      return _bufferList.get(bufferIndex);
     }
 
     // ArrayList of all the buffers
-    private List _bufferList;
+    private List<byte[]> _bufferList;
     // The number of bytes in the last buffer (which may not be full)
     private int  _sizeOfLastBuffer;
 
@@ -436,7 +438,7 @@
 
   // ArrayList of all the in-memory buffers (or null if it's in
   // a File)
-  transient private ArrayList  _buffers;
+  transient private ArrayList<byte[]> _buffers;
   // The number of bytes in the last buffer (which may not be full)
   transient private int        _sizeOfLastBuffer;
 

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/UploadedFiles.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/UploadedFiles.java?rev=429208&r1=429207&r2=429208&view=diff
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/UploadedFiles.java (original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/main/java/org/apache/myfaces/trinidadinternal/webapp/UploadedFiles.java Sun Aug  6 16:12:37 2006
@@ -44,9 +44,11 @@
   /**
    * Returns the map of uploaded files for the current request.
    */
+  @SuppressWarnings("unchecked")
   static public UploadedFiles getUploadedFiles(FacesContext context)
   {
-    Map requestMap = context.getExternalContext().getRequestMap();
+    Map<String, Object> requestMap = 
+      context.getExternalContext().getRequestMap();
     return (UploadedFiles) requestMap.get(_UPLOADED_FILES_KEY);
   }
 
@@ -72,7 +74,7 @@
    */
   public UploadedFile getUploadedFile(String name)
   {
-    UploadedFile file = (UploadedFile) _map.get(name);
+    UploadedFile file = _map.get(name);
     if (file == null)
       return null;
 
@@ -83,7 +85,7 @@
   /**
    * Returns an Iterator of the names of all uploaded files.
    */
-  public Iterator getUploadedNames()
+  public Iterator<String> getUploadedNames()
   {
     return _map.keySet().iterator();
   }
@@ -96,10 +98,10 @@
    */
   public void dispose()
   {
-    Iterator iterator = _map.values().iterator();
+    Iterator<UploadedFile> iterator = _map.values().iterator();
     while (iterator.hasNext())
     {
-      UploadedFile file = (UploadedFile) iterator.next();
+      UploadedFile file = iterator.next();
       file.dispose();
     }
 
@@ -115,6 +117,7 @@
   UploadedFiles(ServletRequest request)
   {
     request.setAttribute(_UPLOADED_FILES_KEY, this);
+    _map = new HashMap<String, UploadedFile>();
   }
 
   /**
@@ -148,7 +151,7 @@
   private long   _totalMemory;
   private long   _totalDiskSpace;
   private String _characterEncoding;
-  private final Map _map = new HashMap();
+  private final Map<String, UploadedFile> _map;
 
   private static final String _UPLOADED_FILES_KEY = 
     "org.apache.myfaces.trinidadinternal.webapp.UploadedFiles";



Mime
View raw message