Hello,
I recently created SLING-4500 because of a bug in sling mocks, when
using the default resource resolver in sling mocks, the root node does
not have any jcr:primary type, this causes a NPE in some cases, for
example, if you use resource.isResourceType() for the root node.
This happens because if there is no resourceType, it will fallback to
the primaryType, but since there is no primary type for the root node, a
NPE is generated.
I already suggested a small fix for this in
https://github.com/apache/sling/pull/72 . Could this be integrated?
Thank you
--
*Santiago García Pimentel* | Software Engineer
Netcentric Ibérica SL
Av. Diagonal 123 -8ª
08005 Barcelona
España
Skype: santiago.garciapimentel
santiago.pimen...@netcentric.biz | www.netcentric.es