You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by im...@apache.org on 2007/10/30 15:33:46 UTC
svn commit: r590084 -
/myfaces/core/branches/1_2_1/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
Author: imario
Date: Tue Oct 30 07:33:45 2007
New Revision: 590084
URL: http://svn.apache.org/viewvc?rev=590084&view=rev
Log:
https://issues.apache.org/jira/browse/MYFACES-1755
create converter with unknown id fails with NPE
Modified:
myfaces/core/branches/1_2_1/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
Modified: myfaces/core/branches/1_2_1/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/1_2_1/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java?rev=590084&r1=590083&r2=590084&view=diff
==============================================================================
--- myfaces/core/branches/1_2_1/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java (original)
+++ myfaces/core/branches/1_2_1/impl/src/main/java/org/apache/myfaces/application/ApplicationImpl.java Tue Oct 30 07:33:45 2007
@@ -71,7 +71,7 @@
/**
* DOCUMENT ME!
- *
+ *
* @author Manfred Geiler (latest modification by $Author$)
* @author Anton Koinov
* @author Thomas Spiegl
@@ -669,8 +669,12 @@
checkEmpty(converterId, "converterId");
Class converterClass = _converterIdToClassMap.get(converterId);
+ if(converterClass == null)
+ {
+ throw new FacesException("Could not find any registered converter-class by converterId : "+converterId);
+ }
- try
+ try
{
Converter converter = (Converter) converterClass.newInstance();
@@ -703,7 +707,7 @@
if (converterClassName == null && targetClass.isEnum()) {
converterClassName = _converterClassNameToClassMap.get(Enum.class);
}
-
+
// Locate a Converter registered for interfaces that are
// implemented by the target class (directly or indirectly).
if (converterClassName == null)