myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sless...@apache.org
Subject svn commit: r698799 [3/4] - in /myfaces/core/branches/2_0_0: api/src/main/java/javax/faces/ api/src/main/java/javax/faces/application/ api/src/test/java/javax/faces/application/ impl/src/main/java/org/apache/myfaces/application/ impl/src/main/java/org/...
Date Thu, 25 Sep 2008 02:03:49 GMT
Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ManagedBeanResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ManagedBeanResolver.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ManagedBeanResolver.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ManagedBeanResolver.java Wed Sep 24 19:03:47 2008
@@ -39,262 +39,302 @@
 
 /**
  * See JSF 1.2 spec section 5.6.1.2
- *
+ * 
  * @author Stan Silvert
  */
-public class ManagedBeanResolver extends ELResolver {
-    private static final Log log              = LogFactory.getLog(ManagedBeanResolver.class);
+public class ManagedBeanResolver extends ELResolver
+{
+    private static final Log log = LogFactory.getLog(ManagedBeanResolver.class);
     private static final String BEANS_UNDER_CONSTRUCTION = "org.apache.myfaces.el.unified.resolver.managedbean.beansUnderConstruction";
-    
+
     // adapted from Manfred's JSF 1.1 VariableResolverImpl
-    protected static final Map s_standardScopes = new HashMap(16);
-    static {
-        s_standardScopes.put(
-            "request",
-            new Scope()
+    protected static final Map<String, Scope> s_standardScopes = new HashMap<String, Scope>(16);
+
+    static
+    {
+        s_standardScopes.put("request", new Scope()
+        {
+            public void put(ExternalContext extContext, String name, Object obj)
             {
-                public void put(ExternalContext extContext, String name, Object obj)
-                {
-                    extContext.getRequestMap().put(name, obj);
-                }
-            });
-        s_standardScopes.put(
-            "session",
-            new Scope()
+                extContext.getRequestMap().put(name, obj);
+            }
+        });
+        
+        s_standardScopes.put("session", new Scope()
+        {
+            public void put(ExternalContext extContext, String name, Object obj)
             {
-                public void put(ExternalContext extContext, String name, Object obj)
-                {
-                    extContext.getSessionMap().put(name, obj);
-                }
-            });
-        s_standardScopes.put(
-            "application",
-            new Scope()
+                extContext.getSessionMap().put(name, obj);
+            }
+        });
+        
+        s_standardScopes.put("application", new Scope()
+        {
+            public void put(ExternalContext extContext, String name, Object obj)
             {
-                public void put(ExternalContext extContext, String name, Object obj)
-                {
-                    extContext.getApplicationMap().put(name, obj);
-                }
-            });
-        s_standardScopes.put(
-            "none",
-            new Scope()
+                extContext.getApplicationMap().put(name, obj);
+            }
+        });
+        
+        s_standardScopes.put("none", new Scope()
+        {
+            public void put(ExternalContext extContext, String name, Object obj)
             {
-                public void put(ExternalContext extContext, String name, Object obj)
-                {
-                    // do nothing
-                }
-            });
+                // do nothing
+            }
+        });
     }
 
     /**
      * Stores all scopes defined for this instance of <code>VariableResolver</code>
      * <p>
-     * Can store instances of <code>Scope</code> which have the ability to
-     * dynamically resolve against ExternalContext for put operations.
+     * Can store instances of <code>Scope</code> which have the ability to dynamically resolve against ExternalContext
+     * for put operations.
      * </p>
      * <p>
-     * WARNING: this implementation is not serialized as it is thread safe because
-     *          it does not update/add to _scopes after object initialization.
-     *          If you need to add your own scopes, either extend and add more
-     *          in an initialization block, or add proper sychronization
+     * WARNING: this implementation is not serialized as it is thread safe because it does not update/add to _scopes
+     * after object initialization. If you need to add your own scopes, either extend and add more in an initialization
+     * block, or add proper sychronization
      * </p>
      */
-    protected final Map _scopes = new HashMap(16);
+    protected final Map<String, Scope> _scopes = new HashMap<String, Scope>(16);
     {
         _scopes.putAll(s_standardScopes);
     }
-    
+
     /**
-     * RuntimeConfig is instantiated once per servlet and never changes--we can
-     * safely cache it
+     * RuntimeConfig is instantiated once per servlet and never changes--we can safely cache it
      */
     private RuntimeConfig runtimeConfig;
-    
+
     private ManagedBeanBuilder beanBuilder = new ManagedBeanBuilder();
-    
+
     /** Creates a new instance of ManagedBeanResolver */
-    public ManagedBeanResolver() {
+    public ManagedBeanResolver()
+    {
     }
 
     public void setValue(final ELContext context, final Object base, final Object property, final Object value)
-        throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException {
-        
-        if ( (base == null) && (property == null)) {
+                                                                                                               throws NullPointerException,
+                                                                                                               PropertyNotFoundException,
+                                                                                                               PropertyNotWritableException,
+                                                                                                               ELException
+    {
+
+        if ((base == null) && (property == null))
+        {
             throw new PropertyNotFoundException();
         }
-        
+
     }
 
-    public boolean isReadOnly(final ELContext context, final Object base, final Object property)
-        throws NullPointerException, PropertyNotFoundException, ELException {
-        
-       if ( (base == null) && (property == null)) {
+    public boolean isReadOnly(final ELContext context, final Object base, final Object property) throws NullPointerException,
+                                                                                                PropertyNotFoundException,
+                                                                                                ELException
+    {
+
+        if ((base == null) && (property == null))
+        {
             throw new PropertyNotFoundException();
         }
-        
+
         return false;
     }
 
-    public Object getValue(final ELContext context, final Object base, final Object property)
-        throws NullPointerException, PropertyNotFoundException, ELException {
-        
-        if (base != null) return null;
-        
-        if (property == null) {
+    public Object getValue(final ELContext context, final Object base, final Object property) throws NullPointerException,
+                                                                                             PropertyNotFoundException,
+                                                                                             ELException
+    {
+
+        if (base != null)
+            return null;
+
+        if (property == null)
+        {
             throw new PropertyNotFoundException();
         }
-        
+
         final ExternalContext extContext = externalContext(context);
-        
-        if (extContext == null) return null;
-        if (extContext.getRequestMap().containsKey(property)) return null;
-        if (extContext.getSessionMap().containsKey(property)) return null;
-        if (extContext.getApplicationMap().containsKey(property)) return null;
-        
-        if ( !(property instanceof String) ) return null;
-        
-        final String strProperty = (String)property;
-        
+
+        if (extContext == null)
+            return null;
+        if (extContext.getRequestMap().containsKey(property))
+            return null;
+        if (extContext.getSessionMap().containsKey(property))
+            return null;
+        if (extContext.getApplicationMap().containsKey(property))
+            return null;
+
+        if (!(property instanceof String))
+            return null;
+
+        final String strProperty = (String) property;
+
         final ManagedBean managedBean = runtimeConfig(context).getManagedBean(strProperty);
         Object beanInstance = null;
-        if (managedBean != null) {
+        if (managedBean != null)
+        {
             FacesContext facesContext = facesContext(context);
             context.setPropertyResolved(true);
             beanInstance = createManagedBean(managedBean, facesContext);
         }
-        
+
         return beanInstance;
     }
-    
-    // Create a managed bean.  If the scope of the bean is "none" then
-    // return it right away.  Otherwise store the bean in the appropriate
+
+    // Create a managed bean. If the scope of the bean is "none" then
+    // return it right away. Otherwise store the bean in the appropriate
     // scope and return null.
     //
     // adapted from Manfred's JSF 1.1 VariableResolverImpl
-    private Object createManagedBean(final ManagedBean managedBean,
-                                  final FacesContext facesContext)
-        throws ELException {
-        
+    @SuppressWarnings("unchecked")
+    private Object createManagedBean(final ManagedBean managedBean, final FacesContext facesContext) throws ELException
+    {
+
         final ExternalContext extContext = facesContext.getExternalContext();
-        final Map requestMap = extContext.getRequestMap();
-        
+        final Map<String, Object> requestMap = extContext.getRequestMap();
+
         // check for cyclic references
-        List beansUnderConstruction = (List)requestMap.get(BEANS_UNDER_CONSTRUCTION);
-        if (beansUnderConstruction == null) {
-            beansUnderConstruction = new ArrayList();
+        List<String> beansUnderConstruction = (List<String>)requestMap.get(BEANS_UNDER_CONSTRUCTION);
+        if (beansUnderConstruction == null)
+        {
+            beansUnderConstruction = new ArrayList<String>();
             requestMap.put(BEANS_UNDER_CONSTRUCTION, beansUnderConstruction);
         }
 
         final String managedBeanName = managedBean.getManagedBeanName();
-        if (beansUnderConstruction.contains(managedBeanName)) {
-            throw new ELException( "Detected cyclic reference to managedBean " + managedBeanName);
+        if (beansUnderConstruction.contains(managedBeanName))
+        {
+            throw new ELException("Detected cyclic reference to managedBean " + managedBeanName);
         }
 
         beansUnderConstruction.add(managedBeanName);
-        
+
         Object obj = null;
-        try {
+        try
+        {
             obj = beanBuilder.buildManagedBean(facesContext, managedBean);
-        } finally {
+        }
+        finally
+        {
             beansUnderConstruction.remove(managedBeanName);
         }
 
         putInScope(managedBean, extContext, obj);
-        
+
         return obj;
     }
-    
-    private void putInScope(final ManagedBean managedBean, final ExternalContext extContext, final Object obj) {
+
+    private void putInScope(final ManagedBean managedBean, final ExternalContext extContext, final Object obj)
+    {
 
         final String managedBeanName = managedBean.getManagedBeanName();
-        
-        if (obj == null) {
+
+        if (obj == null)
+        {
             if (log.isDebugEnabled())
                 log.debug("Variable '" + managedBeanName + "' could not be resolved.");
-        } else {
+        }
+        else
+        {
 
             final String scopeKey = managedBean.getManagedBeanScope();
 
             // find the scope handler object
             final Scope scope = (Scope) _scopes.get(scopeKey);
-            if (scope == null) {
+            if (scope == null)
+            {
                 log.error("Managed bean '" + managedBeanName + "' has illegal scope: " + scopeKey);
-            } else {
+            }
+            else
+            {
                 scope.put(extContext, managedBeanName, obj);
             }
         }
 
     }
-    
+
     // get the FacesContext from the ELContext
-    private static FacesContext facesContext(final ELContext context) {
-        return (FacesContext)context.getContext(FacesContext.class);
+    private static FacesContext facesContext(final ELContext context)
+    {
+        return (FacesContext) context.getContext(FacesContext.class);
     }
-    
-    private static ExternalContext externalContext(final ELContext context) {
+
+    private static ExternalContext externalContext(final ELContext context)
+    {
         final FacesContext facesContext = facesContext(context);
 
         return facesContext != null ? facesContext.getExternalContext() : null;
     }
 
-    public Class<?> getType(final ELContext context, final Object base, final Object property)
-        throws NullPointerException, PropertyNotFoundException, ELException {
-        
-        if ( (base == null) && (property == null)) {
+    public Class<?> getType(final ELContext context, final Object base, final Object property) throws NullPointerException,
+                                                                                              PropertyNotFoundException,
+                                                                                              ELException
+    {
+
+        if ((base == null) && (property == null))
+        {
             throw new PropertyNotFoundException();
         }
-        
+
         return null;
     }
 
-    public Iterator getFeatureDescriptors(final ELContext context, final Object base) {
-        
-        if (base != null) return null;
-        
+    public Iterator<FeatureDescriptor> getFeatureDescriptors(final ELContext context, final Object base)
+    {
+
+        if (base != null)
+            return null;
+
         final ArrayList<FeatureDescriptor> descriptors = new ArrayList<FeatureDescriptor>();
-        
+
         final Map<String, ManagedBean> managedBeans = runtimeConfig(context).getManagedBeans();
-        for (Map.Entry<String, ManagedBean> managedBean : managedBeans.entrySet()) {
+        for (Map.Entry<String, ManagedBean> managedBean : managedBeans.entrySet())
+        {
             descriptors.add(makeDescriptor(managedBean.getKey(), managedBean.getValue()));
         }
-        
+
         return descriptors.iterator();
     }
-    
-    private static FeatureDescriptor makeDescriptor(final String beanName, final ManagedBean managedBean) {
+
+    private static FeatureDescriptor makeDescriptor(final String beanName, final ManagedBean managedBean)
+    {
         final FeatureDescriptor fd = new FeatureDescriptor();
         fd.setValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
         fd.setValue(ELResolver.TYPE, managedBean.getManagedBeanClass());
         fd.setName(beanName);
         fd.setDisplayName(beanName);
-        fd.setShortDescription(managedBean.getDescription());  
+        fd.setShortDescription(managedBean.getDescription());
         fd.setExpert(false);
         fd.setHidden(false);
         fd.setPreferred(true);
         return fd;
     }
 
-    protected RuntimeConfig runtimeConfig(final ELContext context) {
+    protected RuntimeConfig runtimeConfig(final ELContext context)
+    {
         final FacesContext facesContext = facesContext(context);
-        
+
         // application-level singleton - we can safely cache this
-        if (this.runtimeConfig == null) {
+        if (this.runtimeConfig == null)
+        {
             this.runtimeConfig = RuntimeConfig.getCurrentInstance(facesContext.getExternalContext());
         }
-        
+
         return runtimeConfig;
     }
-    
-    public Class<?> getCommonPropertyType(final ELContext context, final Object base) {
-        
-        if (base != null) return null;
-        
+
+    public Class<?> getCommonPropertyType(final ELContext context, final Object base)
+    {
+
+        if (base != null)
+            return null;
+
         return Object.class;
     }
-    
-    interface Scope {
+
+    interface Scope
+    {
         public void put(ExternalContext extContext, String name, Object obj);
     }
-    
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ScopedAttributeResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ScopedAttributeResolver.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ScopedAttributeResolver.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ScopedAttributeResolver.java Wed Sep 24 19:03:47 2008
@@ -34,97 +34,132 @@
 
 /**
  * See JSF 1.2 spec section 5.6.2.7
- *
+ * 
  * @author Stan Silvert
  */
-public final class ScopedAttributeResolver extends ELResolver {
-    
+public final class ScopedAttributeResolver extends ELResolver
+{
+
     /**
      * Creates a new instance of ScopedAttributeResolver
      */
-    public ScopedAttributeResolver() {
+    public ScopedAttributeResolver()
+    {
     }
 
     public void setValue(final ELContext context, final Object base, final Object property, final Object value)
-        throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException {
-        
-        if (base != null) return;
-        if (property == null) throw new PropertyNotFoundException();
+      throws NullPointerException, PropertyNotFoundException, PropertyNotWritableException, ELException
+    {
+        if (base != null)
+        {
+            return;
+        }
         
+        if (property == null)
+        {
+            throw new PropertyNotFoundException();
+        }
+
         final Map<String, Object> scopedMap = findScopedMap(externalContext(context), property);
-        if (scopedMap != null) {
-            scopedMap.put((String)property, value);
-        } else {
-            externalContext(context).getRequestMap().put((String)property, value);
+        if (scopedMap != null)
+        {
+            scopedMap.put((String) property, value);
         }
-        
+        else
+        {
+            externalContext(context).getRequestMap().put((String) property, value);
+        }
+
         context.setPropertyResolved(true);
     }
 
-    public boolean isReadOnly(final ELContext context, final Object base, final Object property)
-        throws NullPointerException, PropertyNotFoundException, ELException {
-        
-        if (base == null) context.setPropertyResolved(true);
-        
+    public boolean isReadOnly(final ELContext context, final Object base, final Object property) 
+      throws NullPointerException, PropertyNotFoundException, ELException
+    {
+        if (base == null)
+        {
+            context.setPropertyResolved(true);
+        }
+
         return false;
     }
 
-    public Object getValue(final ELContext context, final Object base, final Object property)
-        throws NullPointerException, PropertyNotFoundException, ELException {
+    public Object getValue(final ELContext context, final Object base, final Object property) 
+      throws NullPointerException, PropertyNotFoundException, ELException
+    {
+        if (base != null)
+        {
+            return null;
+        }
         
-        if (base != null) return null;
-        if (property == null) throw new PropertyNotFoundException();
+        if (property == null)
+        {
+            throw new PropertyNotFoundException();
+        }
 
         context.setPropertyResolved(true);
 
-        final Map scopedMap = findScopedMap(externalContext(context), property);
-        if (scopedMap != null) {
+        final Map<String, Object> scopedMap = findScopedMap(externalContext(context), property);
+        if (scopedMap != null)
+        {
             return scopedMap.get(property);
         }
-        
+
         return null;
     }
 
-    public Class<?> getType(final ELContext context, final Object base, final Object property)
-        throws NullPointerException, PropertyNotFoundException, ELException {
-        
-        if (base != null) return null;
-        if (property == null) throw new PropertyNotFoundException();
-        
+    public Class<?> getType(final ELContext context, final Object base, final Object property) throws NullPointerException,
+                                                                                              PropertyNotFoundException,
+                                                                                              ELException
+    {
+
+        if (base != null)
+            return null;
+        if (property == null)
+            throw new PropertyNotFoundException();
+
         context.setPropertyResolved(true);
         return Object.class;
     }
 
-    public Iterator<FeatureDescriptor> getFeatureDescriptors(final ELContext context, final Object base) {
-        
-        if (base != null) return null;
-        
+    public Iterator<FeatureDescriptor> getFeatureDescriptors(final ELContext context, final Object base)
+    {
+
+        if (base != null)
+            return null;
+
         final List<FeatureDescriptor> descriptorList = new ArrayList<FeatureDescriptor>();
         final ExternalContext extContext = externalContext(context);
         addDescriptorsToList(descriptorList, extContext.getRequestMap());
         addDescriptorsToList(descriptorList, extContext.getSessionMap());
         addDescriptorsToList(descriptorList, extContext.getApplicationMap());
-        
+
         return descriptorList.iterator();
     }
 
-    public Class<?> getCommonPropertyType(final ELContext context, final Object base) {
-        
-        if (base != null) return null;
-        
+    public Class<?> getCommonPropertyType(final ELContext context, final Object base)
+    {
+
+        if (base != null)
+            return null;
+
         return String.class;
     }
-    
+
     // side effect: modifies the list
-    private static void addDescriptorsToList(final List<FeatureDescriptor> descriptorList, final Map scopeMap) {
-        for (Object name: scopeMap.keySet()) {
-            String strName = (String)name;
-            Class runtimeType = scopeMap.get(strName).getClass();
+    private static void addDescriptorsToList(final List<FeatureDescriptor> descriptorList, 
+                                             final Map<String, Object> scopeMap)
+    {
+        for (Object name : scopeMap.keySet())
+        {
+            String strName = (String) name;
+            Class<?> runtimeType = scopeMap.get(strName).getClass();
             descriptorList.add(makeDescriptor(strName, runtimeType));
         }
     }
-    
-    private static FeatureDescriptor makeDescriptor(final String name, final Class runtimeType) {
+
+    private static FeatureDescriptor makeDescriptor(final String name, final Class<?> runtimeType)
+    {
         FeatureDescriptor fd = new FeatureDescriptor();
         fd.setValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
         fd.setValue(ELResolver.TYPE, runtimeType);
@@ -136,36 +171,43 @@
         fd.setPreferred(true);
         return fd;
     }
-    
+
     // returns null if not found
-    private static Map<String, Object> findScopedMap(final ExternalContext extContext, final Object property) {
-        
-        if (extContext == null) return null;
+    private static Map<String, Object> findScopedMap(final ExternalContext extContext, final Object property)
+    {
+        if (extContext == null)
+            return null;
 
         Map<String, Object> scopedMap = extContext.getRequestMap();
-        if (scopedMap.containsKey(property)) return scopedMap;
-        
+        if (scopedMap.containsKey(property))
+            return scopedMap;
+
         scopedMap = extContext.getSessionMap();
-        if (scopedMap.containsKey(property)) return scopedMap;
+        if (scopedMap.containsKey(property))
+            return scopedMap;
 
         scopedMap = extContext.getApplicationMap();
-        if (scopedMap.containsKey(property)) return scopedMap;
-        
+        if (scopedMap.containsKey(property))
+            return scopedMap;
+
         return null;
     }
-    
+
     // get the FacesContext from the ELContext
-    private static FacesContext facesContext(final ELContext context) {
-        return (FacesContext)context.getContext(FacesContext.class);
+    private static FacesContext facesContext(final ELContext context)
+    {
+        return (FacesContext) context.getContext(FacesContext.class);
     }
-    
-    private static ExternalContext externalContext(final ELContext context) {
+
+    private static ExternalContext externalContext(final ELContext context)
+    {
         FacesContext facesContext = facesContext(context);
-        if (facesContext != null) {
+        if (facesContext != null)
+        {
             return facesContext(context).getExternalContext();
         }
-        
+
         return null;
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ApplicationImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ApplicationImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ApplicationImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ApplicationImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -23,33 +23,36 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class ApplicationImplicitObject extends ImplicitObject {
-    
+public class ApplicationImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "application".intern();
-    
+
     /** Creates a new instance of ApplicationImplicitObject */
-    public ApplicationImplicitObject() {
+    public ApplicationImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return externalContext(context).getContext();
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "Represents the application environment", 
-                             Object.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME, "Represents the application environment", Object.class);
     }
-    
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ApplicationScopeImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ApplicationScopeImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ApplicationScopeImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ApplicationScopeImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -24,33 +24,37 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class ApplicationScopeImplicitObject extends ImplicitObject {
-    
+public class ApplicationScopeImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "applicationScope".intern();
-    
+
     /** Creates a new instance of ApplicationScopeImplicitObject */
-    public ApplicationScopeImplicitObject() {
+    public ApplicationScopeImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return externalContext(context).getApplicationMap();
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "Application scope attributes", 
-                             Map.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME, "Application scope attributes", Map.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CookieImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CookieImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CookieImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/CookieImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -24,33 +24,37 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class CookieImplicitObject extends ImplicitObject {
-    
+public class CookieImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "cookie".intern();
-    
+
     /** Creates a new instance of CookieImplicitObject */
-    public CookieImplicitObject() {
+    public CookieImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return externalContext(context).getRequestCookieMap();
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "Map whose keys are a set of cookie names in the current request", 
-                             Map.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME, "Map whose keys are a set of cookie names in the current request", Map.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/FacesContextImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/FacesContextImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/FacesContextImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/FacesContextImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -24,33 +24,37 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class FacesContextImplicitObject extends ImplicitObject {
-    
+public class FacesContextImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "facesContext".intern();
-    
+
     /** Creates a new instance of FacesContextImplicitObject */
-    public FacesContextImplicitObject() {
+    public FacesContextImplicitObject()
+    {
     }
-    
-    public String getName() {
+
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Object getValue(ELContext context) {
+
+    public Object getValue(ELContext context)
+    {
         return facesContext(context);
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
-    
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                              "Per-request information for a JSF request", 
-                              FacesContext.class);
+
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME, "Per-request information for a JSF request", FacesContext.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/HeaderImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/HeaderImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/HeaderImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/HeaderImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -24,33 +24,37 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class HeaderImplicitObject extends ImplicitObject {
-    
+public class HeaderImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "header".intern();
-    
+
     /** Creates a new instance of HeaderImplicitObject */
-    public HeaderImplicitObject() {
+    public HeaderImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return externalContext(context).getRequestHeaderMap();
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "Map whose keys are a set of request header names in the current request", 
-                             Map.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME, "Map whose keys are a set of request header names in the current request", Map.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/HeaderValuesImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/HeaderValuesImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/HeaderValuesImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/HeaderValuesImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -24,33 +24,39 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class HeaderValuesImplicitObject extends ImplicitObject {
-    
+public class HeaderValuesImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "headerValues".intern();
-    
+
     /** Creates a new instance of HeaderValuesImplicitObject */
-    public HeaderValuesImplicitObject() {
+    public HeaderValuesImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return externalContext(context).getRequestHeaderValuesMap();
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "Map whose keys are a set of request header names and whose values are all of the values (of type String[]) for each header name.", 
-                             Map.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME,
+                              "Map whose keys are a set of request header names and whose values are all of the values (of type String[]) for each header name.",
+                              Map.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -25,31 +25,29 @@
 import javax.faces.context.FacesContext;
 
 /**
- * Implementors of this class encapsulate the information needed to resolve
- * the implicit object.
- *
+ * Implementors of this class encapsulate the information needed to resolve the implicit object.
+ * 
  * @author Stan Silvert
  */
-public abstract class ImplicitObject {
-    
+public abstract class ImplicitObject
+{
+
     public abstract Object getValue(ELContext context);
-    
+
     public abstract FeatureDescriptor getDescriptor();
-    
+
     /**
-     * Returns an interned String representing the name of the 
-     * implicit object.
+     * Returns an interned String representing the name of the implicit object.
      */
     public abstract String getName();
-    
+
     /**
      * Returns the most general type allowed for a future call to setValue()
      */
-    public abstract Class getType();
-    
-    protected FeatureDescriptor makeDescriptor(String name, 
-                                               String description, 
-                                               Class elResolverType) {
+    public abstract Class<?> getType();
+
+    protected FeatureDescriptor makeDescriptor(String name, String description, Class<?> elResolverType)
+    {
         FeatureDescriptor fd = new FeatureDescriptor();
         fd.setValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
         fd.setValue(ELResolver.TYPE, elResolverType);
@@ -61,14 +59,16 @@
         fd.setPreferred(true);
         return fd;
     }
-    
+
     // get the FacesContext from the ELContext
-    protected FacesContext facesContext(ELContext context) {
-        return (FacesContext)context.getContext(FacesContext.class);
+    protected FacesContext facesContext(ELContext context)
+    {
+        return (FacesContext) context.getContext(FacesContext.class);
     }
-    
-    protected ExternalContext externalContext(ELContext context) {
+
+    protected ExternalContext externalContext(ELContext context)
+    {
         return facesContext(context).getExternalContext();
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/InitParamImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/InitParamImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/InitParamImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/InitParamImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -24,33 +24,39 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class InitParamImplicitObject extends ImplicitObject {
-    
+public class InitParamImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "initParam".intern();
-    
+
     /** Creates a new instance of InitParamImplicitObject */
-    public InitParamImplicitObject() {
+    public InitParamImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return externalContext(context).getInitParameterMap();
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "Map whose keys are a set of application initialization param names and whose values are the corresponding values", 
-                             Map.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME,
+                              "Map whose keys are a set of application initialization param names and whose values are the corresponding values",
+                              Map.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ParamImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ParamImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ParamImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ParamImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -24,33 +24,39 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class ParamImplicitObject extends ImplicitObject {
-    
+public class ParamImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "param".intern();
-    
+
     /** Creates a new instance of InitParamImplicitObject */
-    public ParamImplicitObject() {
+    public ParamImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return externalContext(context).getRequestParameterMap();
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "Map whose keys are a set of request param names and whose values are the first (or only) values for each name in the request", 
-                             Map.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME,
+                              "Map whose keys are a set of request param names and whose values are the first (or only) values for each name in the request",
+                              Map.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ParamValuesImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ParamValuesImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ParamValuesImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ParamValuesImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -24,33 +24,39 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class ParamValuesImplicitObject extends ImplicitObject {
-    
+public class ParamValuesImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "paramValues".intern();
-    
+
     /** Creates a new instance of ParamValuesImplicitObject */
-    public ParamValuesImplicitObject() {
+    public ParamValuesImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return externalContext(context).getRequestParameterValuesMap();
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "Map whose keys are a set of request param names and whose values (type String[]) are all values for each name in the request", 
-                             Map.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME,
+                              "Map whose keys are a set of request param names and whose values (type String[]) are all values for each name in the request",
+                              Map.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/RequestImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/RequestImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/RequestImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/RequestImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -23,33 +23,37 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class RequestImplicitObject extends ImplicitObject {
-    
+public class RequestImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "request".intern();
-    
+
     /** Creates a new instance of ParamValueRequestImplicitObject */
-    public RequestImplicitObject() {
+    public RequestImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return externalContext(context).getRequest();
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "Environment-specific object instance for the current request", 
-                             Object.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME, "Environment-specific object instance for the current request", Object.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/RequestScopeImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/RequestScopeImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/RequestScopeImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/RequestScopeImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -24,33 +24,37 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class RequestScopeImplicitObject extends ImplicitObject {
-    
+public class RequestScopeImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "requestScope".intern();
-    
+
     /** Creates a new instance of RequestScopeImplicitObject */
-    public RequestScopeImplicitObject() {
+    public RequestScopeImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return externalContext(context).getRequestMap();
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "Request scope attributes", 
-                             Map.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME, "Request scope attributes", Map.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/SessionImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/SessionImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/SessionImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/SessionImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -23,33 +23,37 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class SessionImplicitObject extends ImplicitObject {
-    
+public class SessionImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "session".intern();
-    
+
     /** Creates a new instance of SessionImplicitObject */
-    public SessionImplicitObject() {
+    public SessionImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return externalContext(context).getSession(false);
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "Session instance for the current request or null if no session exists", 
-                             Object.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME, "Session instance for the current request or null if no session exists", Object.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/SessionScopeImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/SessionScopeImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/SessionScopeImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/SessionScopeImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -24,33 +24,37 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class SessionScopeImplicitObject extends ImplicitObject {
-    
+public class SessionScopeImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "sessionScope".intern();
-    
+
     /** Creates a new instance of SessionScopeImplicitObject */
-    public SessionScopeImplicitObject() {
+    public SessionScopeImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return externalContext(context).getSessionMap();
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "Session scope attributes", 
-                             Map.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME, "Session scope attributes", Map.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ViewImplicitObject.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ViewImplicitObject.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ViewImplicitObject.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/el/unified/resolver/implicitobject/ViewImplicitObject.java Wed Sep 24 19:03:47 2008
@@ -24,33 +24,37 @@
 
 /**
  * Encapsulates information needed by the ImplicitObjectResolver
- *
+ * 
  * @author Stan Silvert
  */
-public class ViewImplicitObject extends ImplicitObject {
-    
+public class ViewImplicitObject extends ImplicitObject
+{
+
     private static final String NAME = "view".intern();
-    
+
     /** Creates a new instance of ViewImplicitObject */
-    public ViewImplicitObject() {
+    public ViewImplicitObject()
+    {
     }
 
-    public Object getValue(ELContext context) {
+    public Object getValue(ELContext context)
+    {
         return facesContext(context).getViewRoot();
     }
 
-    public String getName() {
+    public String getName()
+    {
         return NAME;
     }
-    
-    public Class getType() {
+
+    public Class<?> getType()
+    {
         return null;
     }
 
-    public FeatureDescriptor getDescriptor() {
-        return makeDescriptor(NAME, 
-                             "The root object of a JSF component tree", 
-                             UIViewRoot.class);
+    public FeatureDescriptor getDescriptor()
+    {
+        return makeDescriptor(NAME, "The root object of a JSF component tree", UIViewRoot.class);
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java Wed Sep 24 19:03:47 2008
@@ -18,7 +18,6 @@
  */
 package org.apache.myfaces.lifecycle;
 
-import java.util.Iterator;
 import java.util.Map;
 
 import javax.el.ValueExpression;
@@ -72,7 +71,7 @@
     {
         Assert.notNull(facesContext);
         ExternalContext externalContext = facesContext.getExternalContext();
-        Map requestMap = externalContext.getRequestMap();
+        Map<String, Object> requestMap = externalContext.getRequestMap();
 
         String viewId = (String) requestMap.get(JAVAX_SERVLET_INCLUDE_PATH_INFO);
         boolean traceEnabled = log.isTraceEnabled();

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java Wed Sep 24 19:03:47 2008
@@ -23,16 +23,11 @@
 import javax.faces.application.ViewExpiredException;
 import javax.faces.application.ViewHandler;
 import javax.faces.component.UIViewRoot;
-import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
 import javax.faces.event.PhaseId;
-import javax.portlet.PortletRequest;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.portlet.MyFacesGenericPortlet;
-import org.apache.myfaces.portlet.PortletUtil;
-import org.apache.myfaces.util.DebugUtils;
 
 /**
  * Implements the Restore View Phase (JSF Spec 2.2.1)
@@ -127,51 +122,4 @@
     {
         return PhaseId.RESTORE_VIEW;
     }
-
-    /**
-     * TODO place that stuff into the default view handler implementation.
-     */
-    private static String deriveViewId(FacesContext facesContext)
-    {
-        ExternalContext externalContext = facesContext.getExternalContext();
-
-        if (PortletUtil.isPortletRequest(facesContext))
-        {
-            PortletRequest request = (PortletRequest) externalContext.getRequest();
-            return request.getParameter(MyFacesGenericPortlet.VIEW_ID);
-        }
-
-        String viewId = externalContext.getRequestPathInfo(); // getPathInfo
-        if (viewId == null)
-        {
-            // No extra path info found, so it is probably extension mapping
-            viewId = externalContext.getRequestServletPath(); // getServletPath
-            DebugUtils.assertError(viewId != null, log,
-                    "RequestServletPath is null, cannot determine viewId of current page.");
-            if (viewId == null)
-                return null;
-
-            // TODO: JSF Spec 2.2.1 - what do they mean by "if the default
-            // ViewHandler implementation is used..." ?
-            // - probably that this should use DefaultViewHandlerSupport.calculateServletFacesMapping
-            // rather than duplicating the logic here.
-            String defaultSuffix = externalContext.getInitParameter(ViewHandler.DEFAULT_SUFFIX_PARAM_NAME);
-            String suffix = defaultSuffix != null ? defaultSuffix : ViewHandler.DEFAULT_SUFFIX;
-            DebugUtils.assertError(suffix.charAt(0) == '.', log, "Default suffix must start with a dot!");
-
-            int slashPos = viewId.lastIndexOf('/');
-            int extensionPos = viewId.lastIndexOf('.');
-            if (extensionPos == -1 || extensionPos <= slashPos)
-            {
-                log.error("Assumed extension mapping, but there is no extension in " + viewId);
-                viewId = null;
-            }
-            else
-            {
-                viewId = viewId.substring(0, extensionPos) + suffix;
-            }
-        }
-
-        return viewId;
-    }
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormatRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormatRenderer.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormatRenderer.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormatRenderer.java Wed Sep 24 19:03:47 2008
@@ -21,7 +21,6 @@
 import java.io.IOException;
 import java.text.MessageFormat;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 import javax.faces.component.UIComponent;
@@ -44,29 +43,22 @@
  * @author Thomas Spiegl
  * @version $Revision$ $Date$
  */
-@JSFRenderer(
-    renderKitId="HTML_BASIC",
-    family="javax.faces.Output",
-    type="javax.faces.Format")
-public class HtmlFormatRenderer
-        extends HtmlRenderer
+@JSFRenderer(renderKitId = "HTML_BASIC", family = "javax.faces.Output", type = "javax.faces.Format")
+public class HtmlFormatRenderer extends HtmlRenderer
 {
     private static final Log log = LogFactory.getLog(HtmlFormatRenderer.class);
 
     private static final Object[] EMPTY_ARGS = new Object[0];
 
-    public void encodeBegin(FacesContext facesContext, UIComponent uiComponent)
-            throws IOException
+    public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException
     {
     }
 
-    public void encodeChildren(FacesContext facescontext, UIComponent uicomponent)
-            throws IOException
+    public void encodeChildren(FacesContext facescontext, UIComponent uicomponent) throws IOException
     {
     }
 
-    public void encodeEnd(FacesContext facesContext, UIComponent component)
-            throws IOException
+    public void encodeEnd(FacesContext facesContext, UIComponent component) throws IOException
     {
         RendererUtils.checkParamValidity(facesContext, component, UIOutput.class);
 
@@ -74,7 +66,7 @@
         boolean isEscape;
         if (component instanceof HtmlOutputFormat)
         {
-            isEscape = ((HtmlOutputFormat)component).isEscape();
+            isEscape = ((HtmlOutputFormat) component).isEscape();
         }
         else
         {
@@ -83,8 +75,7 @@
         HtmlTextRendererBase.renderOutputText(facesContext, component, text, isEscape);
     }
 
-    private String getOutputFormatText(FacesContext facesContext,
-                                       UIComponent htmlOutputFormat)
+    private String getOutputFormatText(FacesContext facesContext, UIComponent htmlOutputFormat)
     {
         String pattern = RendererUtils.getStringValue(facesContext, htmlOutputFormat);
         Object[] args;
@@ -94,15 +85,15 @@
         }
         else
         {
-            List argsList = new ArrayList();
-            for (Iterator it = htmlOutputFormat.getChildren().iterator(); it.hasNext(); )
+            List<Object> argsList = new ArrayList<Object>();
+            for (UIComponent child : htmlOutputFormat.getChildren())
             {
-                UIComponent child = (UIComponent)it.next();
                 if (child instanceof UIParameter)
                 {
                     argsList.add(((UIParameter)child).getValue());
                 }
             }
+            
             args = argsList.toArray(new Object[argsList.size()]);
         }
 

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/DelegateValidator.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/DelegateValidator.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/DelegateValidator.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/DelegateValidator.java Wed Sep 24 19:03:47 2008
@@ -27,7 +27,6 @@
 import javax.faces.context.FacesContext;
 import javax.faces.validator.Validator;
 import javax.faces.validator.ValidatorException;
-import javax.servlet.jsp.JspException;
 
 /**
  * This class is used in conjunction with ValidatorImplTag. 

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/DelegateValueChangeListener.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/DelegateValueChangeListener.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/DelegateValueChangeListener.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/DelegateValueChangeListener.java Wed Sep 24 19:03:47 2008
@@ -24,25 +24,22 @@
 import javax.faces.component.StateHolder;
 import javax.faces.context.FacesContext;
 import javax.faces.event.AbortProcessingException;
-import javax.faces.event.ActionEvent;
-import javax.faces.event.ActionListener;
 import javax.faces.event.ValueChangeEvent;
 import javax.faces.event.ValueChangeListener;
 
-
 /**
- * This class is used in conjunction with ValueChangeListenerTag. 
+ * This class is used in conjunction with ValueChangeListenerTag.
  * 
  * When a tag like this is in a jsp page:
  * 
  * <f:valueChangeListener binding="#{mybean}"/>
- *  
- *  or
- *  
+ * 
+ * or
+ * 
  * <f:valueChangeListener type="#{'anyid'}" binding="#{mybean}"/>
  * 
- * The value of mybean could be already on the context, so this
- * converter avoid creating a new variable and use the previous one.
+ * The value of mybean could be already on the context, so this converter avoid creating a new variable and use the
+ * previous one.
  * 
  * @author Leonardo Uribe (latest modification by $Author$)
  * @version $Revision$ $Date$
@@ -86,7 +83,7 @@
 
     public void setTransient(boolean arg0)
     {
-        // Do nothing        
+        // Do nothing
     }
 
     private ValueChangeListener _getDelegate()
@@ -105,8 +102,7 @@
             {
                 try
                 {
-                    listener = (ValueChangeListener) _binding.getValue(facesContext
-                            .getELContext());
+                    listener = (ValueChangeListener)_binding.getValue(facesContext.getELContext());
                     if (null != listener)
                     {
                         return listener;
@@ -114,37 +110,39 @@
                 }
                 catch (ELException e)
                 {
-                    //throw new JspException("Exception while evaluating the binding attribute of Component "
-                    //        + component.getId(), e);
+                    // throw new JspException("Exception while evaluating the binding attribute of Component "
+                    // + component.getId(), e);
                 }
             }
+
             if (null != _type)
             {
-                String className;
+                // FIXME: The listener never get created, check when this class is really used.
+                /*String className;
                 if (_type.isLiteralText())
                 {
                     className = _type.getExpressionString();
                 }
                 else
                 {
-                    className = (String) _type.getValue(facesContext
-                            .getELContext());
-                }
+                    className = (String) _type.getValue(facesContext.getELContext());
+                }*/
+
                 listener = null;
-                //listener = (ActionListener) ClassUtils.newInstance(className);
+                // listener = (ActionListener) ClassUtils.newInstance(className);
                 if (null != _binding)
                 {
                     try
                     {
-                        _binding
-                                .setValue(facesContext.getELContext(), listener);
+                        _binding.setValue(facesContext.getELContext(), listener);
                     }
                     catch (ELException e)
                     {
-                        //throw new JspException("Exception while evaluating the binding attribute of Component "
-                        //        + component.getId(), e);
+                        // throw new JspException("Exception while evaluating the binding attribute of Component "
+                        // + component.getId(), e);
                     }
                 }
+                
                 return listener;
             }
         }
@@ -152,13 +150,12 @@
         {
             throw new FacesException(e);
         }
+        
         return listener;
     }
 
-    public void processValueChange(ValueChangeEvent event)
-            throws AbortProcessingException
+    public void processValueChange(ValueChangeEvent event) throws AbortProcessingException
     {
         _getDelegate().processValueChange(event);
     }
-
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/GenericListenerTag.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/GenericListenerTag.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/GenericListenerTag.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/GenericListenerTag.java Wed Sep 24 19:03:47 2008
@@ -18,26 +18,24 @@
  */
 package org.apache.myfaces.taglib.core;
 
-import org.apache.myfaces.shared_impl.util.ClassUtils;
-
 import javax.el.ELException;
 import javax.el.ValueExpression;
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
-import javax.faces.event.ActionListener;
 import javax.faces.webapp.UIComponentClassicTagBase;
 import javax.faces.webapp.UIComponentELTag;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.Tag;
 import javax.servlet.jsp.tagext.TagSupport;
 
+import org.apache.myfaces.shared_impl.util.ClassUtils;
+
 /**
  * @author Andreas Berger (latest modification by $Author$)
  * @version $Revision$ $Date$
  * @since 1.2
  */
-public abstract class GenericListenerTag<_Holder, _Listener>
-        extends TagSupport
+public abstract class GenericListenerTag<_Holder, _Listener> extends TagSupport
 {
     private ValueExpression _type = null;
     private ValueExpression _binding = null;
@@ -69,7 +67,8 @@
     protected abstract void addListener(_Holder holder, _Listener listener);
 
     protected abstract _Listener createDelegateListener(ValueExpression type, ValueExpression binding);
-    
+
+    @SuppressWarnings("unchecked")
     public int doStartTag() throws JspException
     {
         UIComponentClassicTagBase componentTag = UIComponentELTag.getParentUIComponentClassicTagBase(pageContext);
@@ -92,25 +91,28 @@
         UIComponent component = componentTag.getComponentInstance();
         try
         {
-            holder = (_Holder) component;
-        } catch (ClassCastException e)
+            holder = (_Holder)component;
+        }
+        catch (ClassCastException e)
         {
-            throw new JspException(
-                    "Component " + ((UIComponent) holder).getId() + " is not instance of " + _holderClazz.getName());
+            throw new JspException("Component " + ((UIComponent) holder).getId() + " is not instance of "
+                    + _holderClazz.getName());
         }
-        
+
         if (_type != null && _type.isLiteralText())
         {
-            createListener(holder,component);
-        }else{
-            addListener(holder, createDelegateListener(_type,_binding));
+            createListener(holder, component);
         }
-        
+        else
+        {
+            addListener(holder, createDelegateListener(_type, _binding));
+        }
+
         return Tag.SKIP_BODY;
     }
-    
-    protected void createListener(_Holder holder, UIComponent component) 
-        throws JspException
+
+    @SuppressWarnings("unchecked")
+    protected void createListener(_Holder holder, UIComponent component) throws JspException
     {
         FacesContext facesContext = FacesContext.getCurrentInstance();
         _Listener listener;
@@ -131,8 +133,8 @@
                 }
                 catch (ELException e)
                 {
-                    throw new JspException("Exception while evaluating the binding attribute of Component "
-                            + component.getId(), e);
+                    throw new JspException("Exception while evaluating the binding attribute of Component " + component.getId(),
+                                           e);
                 }
             }
             if (null != _type)
@@ -141,37 +143,42 @@
                 if (_type.isLiteralText())
                 {
                     className = _type.getExpressionString();
-                    //If type is literal text we should create
-                    //a new instance
+                    // If type is literal text we should create
+                    // a new instance
                     listener = (_Listener) ClassUtils.newInstance(className);
-                } else
+                }
+                else
                 {
                     className = (String) _type.getValue(facesContext.getELContext());
                     listener = null;
                 }
-                                
+
                 if (null != _binding)
                 {
                     try
                     {
                         _binding.setValue(facesContext.getELContext(), listener);
-                    } catch (ELException e)
+                    }
+                    catch (ELException e)
                     {
                         throw new JspException("Exception while evaluating the binding attribute of Component "
                                 + component.getId(), e);
                     }
-                }else{
-                    //Type is a EL expression, and there is
-                    //no binding property so we should create
-                    //a new instance
+                }
+                else
+                {
+                    // Type is a EL expression, and there is
+                    // no binding property so we should create
+                    // a new instance
                     listener = (_Listener) ClassUtils.newInstance(className);
                 }
                 addListener(holder, listener);
             }
-        } catch (ClassCastException e)
+        }
+        catch (ClassCastException e)
         {
             throw new JspException(e);
-        }        
+        }
     }
-    
+
 }

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/LoadBundleTag.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/LoadBundleTag.java?rev=698799&r1=698798&r2=698799&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/LoadBundleTag.java (original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/taglib/core/LoadBundleTag.java Wed Sep 24 19:03:47 2008
@@ -38,27 +38,23 @@
 
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspAttribute;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFJspTag;
+
 /**
  * Loads a resource bundle and saves it as a variable in the request scope.
  * <p>
  * Unless otherwise specified, all attributes accept static values or EL expressions.
  * </p>
- * <p> 
- * TODO:
- * We should find a way to save loaded bundles in the state, because otherwise
- * on the next request the bundle map will not be present before the render phase
- * and value bindings that reference to the bundle will always log annoying
+ * <p>
+ * TODO: We should find a way to save loaded bundles in the state, because otherwise on the next request the bundle map
+ * will not be present before the render phase and value bindings that reference to the bundle will always log annoying
  * "Variable 'xxx' could not be resolved" error messages.
  * </p>
- *
+ * 
  * @author Manfred Geiler (latest modification by $Author$)
  * @version $Revision$ $Date$
  */
-@JSFJspTag(
-        name="f:loadBundle",
-        bodyContent="empty")
-public class LoadBundleTag
-        extends TagSupport
+@JSFJspTag(name = "f:loadBundle", bodyContent = "empty")
+public class LoadBundleTag extends TagSupport
 {
     private static final long serialVersionUID = -8892145684062838928L;
 
@@ -68,20 +64,16 @@
     /**
      * The base name of the resource bundle.
      */
-    @JSFJspAttribute(
-            required=true,
-            rtexprvalue=true,
-            className="java.lang.String")
+    @JSFJspAttribute(required = true, rtexprvalue = true, className = "java.lang.String")
     public void setBasename(ValueExpression basename)
     {
         _basename = basename;
     }
 
     /**
-     * The name of the variable in request scope that the resources
-     * are saved to.  This must be a static value.
+     * The name of the variable in request scope that the resources are saved to. This must be a static value.
      */
-    @JSFJspAttribute(required=true)
+    @JSFJspAttribute(required = true)
     public void setVar(String var)
     {
         _var = var;
@@ -113,10 +105,14 @@
         }
 
         String basename = null;
-        if (_basename!=null) {
-            if (_basename.isLiteralText()) {
+        if (_basename != null)
+        {
+            if (_basename.isLiteralText())
+            {
                 basename = _basename.getExpressionString();
-            } else {
+            }
+            else
+            {
                 basename = (String) _basename.getValue(facesContext.getELContext());
             }
         }
@@ -129,22 +125,18 @@
         final ResourceBundle bundle;
         try
         {
-            bundle = ResourceBundle.getBundle(basename,
-                                              locale,
-                                              Thread.currentThread().getContextClassLoader());
+            bundle = ResourceBundle.getBundle(basename, locale, Thread.currentThread().getContextClassLoader());
         }
         catch (MissingResourceException e)
         {
             throw new JspException("Resource bundle '" + basename + "' could not be found.", e);
         }
 
-        facesContext.getExternalContext().getRequestMap().put(_var,
-                                                              new BundleMap(bundle));
+        facesContext.getExternalContext().getRequestMap().put(_var, new BundleMap(bundle));
         return Tag.SKIP_BODY;
     }
 
-
-    private static class BundleMap implements Map
+    private static class BundleMap implements Map<String, String>
     {
         private ResourceBundle _bundle;
         private List<String> _values;
@@ -154,13 +146,16 @@
             _bundle = bundle;
         }
 
-        //Optimized methods
+        // Optimized methods
 
-        public Object get(Object key)
+        public String get(Object key)
         {
-            try {
-                return _bundle.getObject(key.toString());
-            } catch (Exception e) {
+            try
+            {
+                return (String)_bundle.getObject(key.toString());
+            }
+            catch (Exception e)
+            {
                 return "???" + key + "???";
             }
         }
@@ -182,10 +177,9 @@
             }
         }
 
+        // Unoptimized methods
 
-        //Unoptimized methods
-
-        public Collection values()
+        public Collection<String> values()
         {
             if (_values == null)
             {
@@ -209,24 +203,25 @@
             return values().contains(value);
         }
 
-        public Set entrySet()
+        public Set<Map.Entry<String, String>> entrySet()
         {
-            Set<Entry> set = new HashSet<Entry>();
-            for (Enumeration<String> enumer = _bundle.getKeys(); enumer.hasMoreElements(); )
+            Set<Entry<String, String>> set = new HashSet<Entry<String, String>>();
+            for (Enumeration<String> enumer = _bundle.getKeys(); enumer.hasMoreElements();)
             {
                 final String k = enumer.nextElement();
-                set.add(new Map.Entry() {
-                    public Object getKey()
+                set.add(new Map.Entry<String, String>()
+                {
+                    public String getKey()
                     {
                         return k;
                     }
 
-                    public Object getValue()
+                    public String getValue()
                     {
-                        return _bundle.getObject(k);
+                        return (String)_bundle.getObject(k);
                     }
 
-                    public Object setValue(Object value)
+                    public String setValue(String value)
                     {
                         throw new UnsupportedOperationException(this.getClass().getName() + " UnsupportedOperationException");
                     }
@@ -235,30 +230,29 @@
             return set;
         }
 
-        public Set keySet()
+        public Set<String> keySet()
         {
             Set<String> set = new HashSet<String>();
-            for (Enumeration<String> enumer = _bundle.getKeys(); enumer.hasMoreElements(); )
+            for (Enumeration<String> enumer = _bundle.getKeys(); enumer.hasMoreElements();)
             {
                 set.add(enumer.nextElement());
             }
             return set;
         }
 
+        // Unsupported methods
 
-        //Unsupported methods
-
-        public Object remove(Object key)
+        public String remove(Object key)
         {
             throw new UnsupportedOperationException(this.getClass().getName() + " UnsupportedOperationException");
         }
 
-        public void putAll(Map t)
+        public void putAll(Map<? extends String, ? extends String> t)
         {
             throw new UnsupportedOperationException(this.getClass().getName() + " UnsupportedOperationException");
         }
 
-        public Object put(Object key, Object value)
+        public String put(String key, String value)
         {
             throw new UnsupportedOperationException(this.getClass().getName() + " UnsupportedOperationException");
         }



Mime
View raw message