This is an automated email from the ASF dual-hosted git repository. justin pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/sling-site.git
The following commit(s) were added to refs/heads/asf-site by this push: new a0b96df update Sling Models documentation to clarify @PostConstruct methods with the same name a0b96df is described below commit a0b96dff701d8cd98967016e3eb27c94ff166082 Author: Justin Edelson <jus...@justinedelson.com> AuthorDate: Tue Nov 7 09:48:44 2017 -0500 update Sling Models documentation to clarify @PostConstruct methods with the same name --- documentation/bundles/models.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/bundles/models.html b/documentation/bundles/models.html index 133936e..2092f1d 100644 --- a/documentation/bundles/models.html +++ b/documentation/bundles/models.html @@ -274,7 +274,7 @@ public class MyModel { } } </code></pre> -<p><code>@PostConstruct</code> methods in a super class will be invoked first.</p> +<p><code>@PostConstruct</code> methods in a super class will be invoked first. If a <code>@PostConstruct</code> method exists in a subclass with the same name as in the parent class, only the subclass method will be invoked. This is the case regardless of the scope of either method.</p> <p>Since Sling Models Implementation 1.4.6, <code>@PostConstruct</code> methods may return a <code>false</code> boolean value in which case the model creation will fail without logging any exception (a message will be logged at the <code>DEBUG</code> level).</p> <h2><a href="#via" name="via">Via</a></h2> <p>In some cases, a different object should be used as the adaptable instead of the original adaptable. This can be done using the <code>@Via</code> annotation. By default, this can be done using a JavaBean property of the adaptable:</p> @@ -705,7 +705,7 @@ assert object1 == object2; <li><code>getAdaptable()</code> should return the new adaptable or <code>ViaProvider.ORIGINAL</code> to indicate that the original adaptable should be used.</li> </ul></section></div></div> <div class="footer"> -<div class="revisionInfo">Last modified by <span class="author">Justin Edelson</span> on <span class="comment">Sun Oct 1 08:33:05 2017 -0400</span></div> <p> +<div class="revisionInfo">Last modified by <span class="author">Justin Edelson</span> on <span class="comment">Tue Nov 7 09:44:47 2017 -0500</span></div> <p> Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project logo are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners. </p><p> Copyright © 2011-2017 The Apache Software Foundation. -- To stop receiving notification emails like this one, please contact ['"commits@sling.apache.org" <commits@sling.apache.org>'].