Thanks Bertrand, that makes sense. So, to recap it's fine to use the deprecated API.
I would recommend getting rid of the deprecation in all honesty as it might be sending the wrong message to developers, especially since there is no effective replacement. I might take it upon myself to code up said public replacement (my first Sling contribution!) which avoids using the jcr apis. Regards, Carlos On Thu, Jun 11, 2020 at 4:40 AM Bertrand Delacretaz <bdelacre...@apache.org> wrote: > Hi, > > On Thu, Jun 11, 2020 at 3:06 AM Carlos Munoz <camu...@redhat.com> wrote: > > ...We are currently using class > > org.apache.sling.servlets.post.AbstractPostOperation but it is deprecated > > (seems to have been for a while)... > > As per https://issues.apache.org/jira/browse/SLING-6722 the reason for > deprecation is that it'0s "using javax.jcr api and therefore creates a > mixture between Sling's resource API and the JCR api". > > Which I think is a good reason, but if you use JCR APIs elsewhere > anyway in your project I don't think using that class is a problem for > you. I just clarified its Javadoc comments to mention that. > > I don't think we have a public replacement at this point, as you > mention the > org.apache.sling.servlets.post.impl.operations.AbstractPostOperation > is in a non-exported package. If we need a non-JCR public variant of > it, we could move that code to a new > o.a.s.servlets.post.SlingAbstractPostOperation and have > o.a.s.servlets.post.impl.operations.AbstractPostOperation inherit from > it. > > -Bertrand > >