Author: julien_viet
Date: 2010-01-07 19:38:50 -0500 (Thu, 07 Jan 2010)
New Revision: 1198
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java
Log:
remove non type safe code that can lead to class cast exception
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java
===================================================================
---
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java 2010-01-07
23:20:21 UTC (rev 1197)
+++
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/core/UIContainer.java 2010-01-08
00:38:50 UTC (rev 1198)
@@ -69,8 +69,7 @@
children.add(uicomponent);
}
- @SuppressWarnings("unchecked")
- public <T extends UIComponent> T removeChildById(String id)
+ public UIComponent removeChildById(String id)
{
if (children == null)
return null;
@@ -80,7 +79,7 @@
continue;
child.setParent(null);
children.remove(child);
- return (T)child;
+ return child;
}
return null;
}
Show replies by date