myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sless...@apache.org
Subject svn commit: r722684 - in /myfaces/core/branches/2_0_0: api/src/main/java/javax/faces/application/Application.java impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
Date Tue, 02 Dec 2008 23:59:58 GMT
Author: slessard
Date: Tue Dec  2 15:59:58 2008
New Revision: 722684

URL: http://svn.apache.org/viewvc?rev=722684&view=rev
Log:
Compilation error fix

Modified:
    myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/Application.java
    myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java

Modified: myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/Application.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/Application.java?rev=722684&r1=722683&r2=722684&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/Application.java
(original)
+++ myfaces/core/branches/2_0_0/api/src/main/java/javax/faces/application/Application.java
Tue Dec  2 15:59:58 2008
@@ -198,7 +198,7 @@
      */
     public UIComponent createComponent(FacesContext context, Resource componentResource)
     {
-        // TODO: JSF 2.0 #43
+        // TODO: JSF 2.0 #60
         throw new UnsupportedOperationException();
     }
 
@@ -211,7 +211,6 @@
      */
     public UIComponent createComponent(FacesContext context, String componentType, String
rendererType)
     {
-        // TODO: JSF 2.0 #1
         throw new UnsupportedOperationException();
     }
 

Modified: myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java?rev=722684&r1=722683&r2=722684&view=diff
==============================================================================
--- myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
(original)
+++ myfaces/core/branches/2_0_0/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
Tue Dec  2 15:59:58 2008
@@ -133,7 +133,7 @@
     // synchronize, uses ConcurrentHashMap to allow concurrent read of map
     private final Map<String, Class<? extends Converter>> _converterIdToClassMap
= new ConcurrentHashMap<String, Class<? extends Converter>>();
 
-    private final Map<Class, String> _converterClassNameToClassMap = new ConcurrentHashMap<Class,
String>();
+    private final Map<Class<?>, String> _converterClassNameToClassMap = new ConcurrentHashMap<Class<?>,
String>();
 
     private final Map<String, org.apache.myfaces.config.impl.digester.elements.Converter>
_converterClassNameToConfigurationMap = new ConcurrentHashMap<String, org.apache.myfaces.config.impl.digester.elements.Converter>();
 
@@ -397,12 +397,16 @@
         return _runtimeConfig.getExpressionFactory();
     }
 
+    @SuppressWarnings("unchecked")
     @Override
-    public final Object evaluateExpressionGet(final FacesContext context, final String expression,
-                                              final Class expectedType) throws ELException
+    public final <T> T evaluateExpressionGet(final FacesContext context, final String
expression,
+                                             final Class<? extends T> expectedType)
throws ELException
     {
         ELContext elContext = context.getELContext();
-        return getExpressionFactory().createValueExpression(elContext, expression, expectedType).getValue(elContext);
+        
+        ExpressionFactory factory = getExpressionFactory();
+        
+        return (T)factory.createValueExpression(elContext, expression, expectedType).getValue(elContext);
     }
 
     @Override
@@ -502,7 +506,7 @@
     }
 
     @Override
-    public final Iterator<Class> getConverterTypes()
+    public final Iterator<Class<?>> getConverterTypes()
     {
         return _converterClassNameToClassMap.keySet().iterator();
     }
@@ -755,7 +759,7 @@
     }
 
     @Override
-    public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, Class
sourceClass,
+    public void subscribeToEvent(Class<? extends SystemEvent> systemEventClass, Class<?>
sourceClass,
                                  SystemEventListener listener)
     {
         checkNull(systemEventClass, "systemEventClass");
@@ -776,7 +780,7 @@
     }
 
     @Override
-    public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass,
Class sourceClass,
+    public void unsubscribeFromEvent(Class<? extends SystemEvent> systemEventClass,
Class<?> sourceClass,
                                      SystemEventListener listener)
     {
         checkNull(systemEventClass, "systemEventClass");
@@ -838,7 +842,7 @@
     }
 
     @Override
-    public final void addConverter(final Class targetClass, final String converterClass)
+    public final void addConverter(final Class<?> targetClass, final String converterClass)
     {
         checkNull(targetClass, "targetClass");
         checkNull(converterClass, "converterClass");
@@ -997,14 +1001,14 @@
     }
 
     @Override
-    public final Converter createConverter(final Class targetClass)
+    public final Converter createConverter(final Class<?> targetClass)
     {
         checkNull(targetClass, "targetClass");
 
         return internalCreateConverter(targetClass);
     }
 
-    private Converter internalCreateConverter(final Class targetClass)
+    private Converter internalCreateConverter(final Class<?> targetClass)
     {
         // Locate a Converter registered for the target class itself.
         String converterClassName = _converterClassNameToClassMap.get(targetClass);
@@ -1141,7 +1145,7 @@
      */
     @Deprecated
     @Override
-    public final MethodBinding createMethodBinding(final String reference, Class[] params)
+    public final MethodBinding createMethodBinding(final String reference, Class<?>[]
params)
             throws ReferenceSyntaxException
     {
         checkNull(reference, "reference");



Mime
View raw message