Minor generics improvement
--------------------------
Key: MGNLSTK-688
URL: http://jira.magnolia-cms.com/browse/MGNLSTK-688
Project: Magnolia Standard Templating Kit
Issue Type: Improvement
Components: base system
Affects Versions: 1.3.5, 1.3.4, 1.3.3, 1.3.2, 1.3.1, 1.3
Reporter: Roelof Jan
Assignee: Philipp Bärfuss
Attachments: RenderingModelImpl.java, STKTemplateModel.java
I ran into some issues concerning the use of generics:
public class RenderingModelImpl<RD extends RenderableDefinition> implements
RenderingModel
shouldn't this be
public class RenderingModelImpl<RD extends RenderableDefinition> implements
RenderingModel<RD>
When this is fixed it would be nice to be able to subclass both
STKTemplateModel and STKTemplate while being able to access operations on the
STKTemplate subclass by getDefinition() on the model class. After the previous
fix this would possible without braking anything.
Change:
public class STKTemplateModel extends RenderingModelImpl<STKTemplate>
to
public class STKTemplateModel<RD extends STKTemplate> extends
RenderingModelImpl<RD>
using this constructor:
public STKTemplateModel(Content content, RD definition, RenderingModel parent) {
super(content, definition, parent);
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.magnolia-cms.com/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------