[ 
http://jira.magnolia-cms.com/browse/MGNLSTK-688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=30500#action_30500
 ] 

Philipp Bärfuss commented on MGNLSTK-688:
-----------------------------------------

Seams to make much sense to me.

> 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, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5
>            Reporter: Roelof Jan
>            Assignee: Philipp Bärfuss
>         Attachments: RenderingModelImpl.java, STKTemplateModel.java
>
>   Original Estimate: 10m
>  Remaining Estimate: 10m
>
> 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]>
----------------------------------------------------------------

Reply via email to