Yes, moving it to another module is totally fine. Still I would prefer to keep 
it in a dedicated class and not mix it with pojo java use provider. But that is 
your call...
Konrad 

> Am 16.04.2020 um 09:18 schrieb Radu Cotescu <r...@apache.org>:
> 
> Hi,
> 
> Ok, I’ll keep the implementation relying on the ModelFactory, but will move 
> it to the JavaUseProvider, with an optional import of the 
> org.apache.sling.models.factory package. I just don’t want a separate module 
> any more for just one class, with a lot of duplication. Hope that’s fine for 
> you, Konrad!
> 
> Thanks,
> Radu
> 
>> On 15 Apr 2020, at 19:09, Konrad Windszus <konra...@gmx.de> wrote:
>> 
>> Wrapping the exception is ok as long as the old exception is still 
>> accessible. One can easily write a ServletFilter which catches (and unwraps) 
>> the exception to throw the 500!
>> With the adaptTo approach the exception will never hit any servlet filter!
>> 
> 

Reply via email to