Details
-
Improvement
-
Resolution: Fixed
-
Major
-
4.3
-
None
Description
AbstractContent defines
abstract public NodeData getNodeData(String name, int type) throws AccessDeniedException, RepositoryException;
method that all extending classes need to implement and ContentWrapper implements this method as well, undiscriminatelly casting Content returned by
public Content getWrappedContent();
method into AbstractContent.
Since the content wrapper is used to wrap all sorts of content in Magnolia making it actually mandatory for all Content implementations to extend AbstractContent the abstract method above should be declared in the Content interface directly or the ContentWrapper init method should be changed to accept only objects extending AbstractContent rather then those implementing Content.
For example the easymock objects created against Content interface obviously fail to be casted into AbstractContent.
Checklists
Acceptance criteria