[ 
https://issues.apache.org/jira/browse/SLING-5753?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15307839#comment-15307839
 ] 

Levente Santha commented on SLING-5753:
---------------------------------------

1. If a Sling Model class implements the Use interface or extends a class 
implementing it, that certainly means that the particular model would be 
supporting a Sightly script. This actually extends the domain of application of 
Sling Models as a tool while providing support for a domain not covered so far.
2. If I look at the design goals of Sling Models the anomaly described here 
clearly goes against some of them.
3. It's quite intrusive behavior to add an annotation and as a result have some 
functionality disabled in my class. I want to enhance my classes not to reduce 
them and then work on rewriting lost functionality. (It might also violate the 
JLS [1].) 

[1]https://docs.oracle.com/javase/specs/jls/se8/html/jls-9.html#jls-9.7


> Use.init() not invoked for Java Use object which is also a Sling Model
> ----------------------------------------------------------------------
>
>                 Key: SLING-5753
>                 URL: https://issues.apache.org/jira/browse/SLING-5753
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting Sightly Models Use Provider 1.0.0
>            Reporter: Levente Santha
>            Priority: Minor
>         Attachments: SLING_5753.patch
>
>
> [~kwin],
> In the situation where I start with a Java Use object and later decide to use 
> some convenient features of Sling Models, I have the surprise to experience 
> that as soon as my Java Use object gets the @Model annotation its init() 
> method is not invoked any more.
> I can see no good reason for this, so I created a patch to fix it.
> Please let me know what you think.
> Thank you, Levente



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to