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
Philip Breau
created issue -
Deryk Sinotte
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [] | |
Fix Version/s | 1.8.2-EE-GA_P02 [ 10226 ] | |
Assignee | Deryk Sinotte [ deryk.sinotte ] |
Deryk Sinotte
made changes -
Salesforce Case | [] | |
Assignee Priority | P2 |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #23019 | Wed Nov 03 08:40:48 MDT 2010 | deryk.sinotte | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/portlet/PortletEnvironmentRenderRequest.java
|
Deryk Sinotte
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee Priority | P2 |
Resolving. Applied recommended changes.