com.liferay.portal.model.impl.PortletImpl.java
/**
* Checks whether this portlet is equal to the specified object.
*
* @param obj the object to compare this portlet against
* @return true if the portlet is equal to the specified object
*/
public boolean equals(Object obj) {
/****************** ********************/
/* WebSphere calls equals method while retreiving request attributes. This call throws
* ClassCastException. To avoid this following condition is added to check if the argument
* object is of type Portlet
*/
if(obj instanceof Portlet){
Portlet portlet = (Portlet)obj;
return getPortletId().equals(portlet.getPortletId());
}else{
return false;
}
/****************** ********************/
}
No comments:
Post a Comment