Author: nbelaevski
Date: 2008-12-04 09:42:26 -0500 (Thu, 04 Dec 2008)
New Revision: 11548
Modified:
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java
Log:
NPE in UIOrderingBaseComponent fixed
Modified:
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java
===================================================================
---
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java 2008-12-04
14:41:35 UTC (rev 11547)
+++
trunk/ui/orderingList/src/main/java/org/richfaces/component/UIOrderingBaseComponent.java 2008-12-04
14:42:26 UTC (rev 11548)
@@ -20,7 +20,6 @@
*/
package org.richfaces.component;
-import java.beans.FeatureDescriptor;
import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Arrays;
@@ -30,8 +29,6 @@
import java.util.List;
import java.util.Map;
-import javax.el.ELContext;
-import javax.el.ELResolver;
import javax.el.ValueExpression;
import javax.faces.FacesException;
import javax.faces.application.Application;
@@ -601,14 +598,19 @@
};
public Converter getConverterForValue(FacesContext context) {
+ Converter converter = null;
ValueExpression expression = this.getValueExpression("value");
- Class<?> containerClass = ELUtils.getContainerClass(context, expression);
-
- Converter converter = getConverterForType(context, containerClass);
- if (converter == null && String.class.equals(containerClass)) {
- converter = noOpConverter;
+
+ if (expression != null) {
+ Class<?> containerClass = ELUtils.getContainerClass(context, expression);
+
+ converter = getConverterForType(context, containerClass);
+ if (converter == null && String.class.equals(containerClass)) {
+ converter = noOpConverter;
+ }
}
+
return converter;
}
}
\ No newline at end of file
Show replies by date