Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.2-EE-GA_P01
-
Fix Version/s: 1.8.2-EE-GA_P02
-
Component/s: Framework
-
Labels:None
-
Environment:Liferay 5.2.3, ICEfaces 1.8
Description
The PortletEnvironmentRenderRequest attempts to cast the list values of portal properties to a LinkedList. In WebSpace 10.0.7 (based on Liferay 5.2.3), the underlying implementation is actually an ArrayList, resulting in a ClassCastException. We should cast to a List interface instead of the LinkedList implementation.
Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.LinkedList
at com.icesoft.faces.webapp.http.portlet.PortletEnvironmentRenderRequest.getProperty(PortletEnvironmentRenderRequest.java:121)
at ca.medavie.providerweb.idm.portlet.beans.AccountLoaderBean.init(AccountLoaderBean.java:50)
... 278 more
PortletEnvironmentRenderRequest line 151:
public String getProperty(String name) {
if (properties.containsKey(name)) {
List values = (List) properties.get(name);
return (String) values.get(0);
} else {
return null;
}
}
public Enumeration getProperties(String name) {
if (properties.containsKey(name)) {
List values = (List) properties.get(name);
return Collections.enumeration(values);
} else {
return Collections.enumeration(Collections.EMPTY_LIST);
}
}
Caused by: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.LinkedList
at com.icesoft.faces.webapp.http.portlet.PortletEnvironmentRenderRequest.getProperty(PortletEnvironmentRenderRequest.java:121)
at ca.medavie.providerweb.idm.portlet.beans.AccountLoaderBean.init(AccountLoaderBean.java:50)
... 278 more
PortletEnvironmentRenderRequest line 151:
public String getProperty(String name) {
if (properties.containsKey(name)) {
List values = (List) properties.get(name);
return (String) values.get(0);
} else {
return null;
}
}
public Enumeration getProperties(String name) {
if (properties.containsKey(name)) {
List values = (List) properties.get(name);
return Collections.enumeration(values);
} else {
return Collections.enumeration(Collections.EMPTY_LIST);
}
}
Activity
- All
- Comments
- History
- Activity
- Remote Attachments
- Subversion
Resolving. Applied recommended changes.