Bertrand Delacretaz wrote > Hi Carsten, > > On Tue, Mar 2, 2010 at 12:05 PM, Carsten Ziegeler <[email protected]> > wrote: >> Carsten Ziegeler wrote: >>> Carsten Ziegeler wrote: >>> ...the fake node is used inside >>> the StarResource to determine the resource type...which seems a little >>> bit strange to me... >>> >> In fact this causes for trouble as we pass the fake node to possibly >> registered jcr resource type providers. As soon as they call any method >> other >> the two supported methods of the fake node, we might get NPE's and whatnot. >> >> So I strongly suggest we remove this... > > This broke the espblog sample, and a number of other samples (in blog > posts, presentations etc) where we need to have a resource type for > URLs like /content/foo/*.html - I have reopened SLING-1420, can you > have a look? > Actually I don't know what the best solution is - however the former solution is way too fragile - passing in a fake node into the JcrResourceTypeProvider is bound to fail. As soon as the provider calls any other method than getPath() it fails - and that's imho not acceptable.
So I think we should go with Felix suggestion (which I think we already suggested some months ago) and provide a better interface for the resource type provider. Carsten -- Carsten Ziegeler [email protected]
