Hi Carlos,

On Thu, Jun 18, 2020 at 3:59 AM Carlos Munoz <camu...@redhat.com> wrote:
...
> https://github.com/apache/sling-org-apache-sling-servlets-post/pull/5
...

Thank you for this!

In the meantime I think there's a simpler way for you to use the
existing org.apache.sling.servlets.post.impl.operations.AbstractPostOperation
with no changes to Sling code.

That class is public, so you can use it in your code, however it's not
exported at runtime so your bundle fails to load it.

The workaround is to embed the class in your bundle, using a bnd
-includeresource as in [1].

I think this is in some ways better than us moving that class to an
exported package, as you can then precisely control which version of
that class you use as that's the one you embedded as opposed to
whatever the environment provides.

Would that work for you?

-Bertrand

P.S. too bad this means we probably don't need your contribution,
sorry that we didn't suggest this variant before

[1] 
https://github.com/apache/sling-org-apache-sling-servlets-post/blob/master/bnd.bnd

Reply via email to