You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "santiago garcía pimentel (JIRA)" <ji...@apache.org> on 2015/03/13 16:30:38 UTC

[jira] [Updated] (SLING-4500) Missing primary type in the root node, when using the mocked resource resolver

     [ https://issues.apache.org/jira/browse/SLING-4500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

santiago garcía pimentel updated SLING-4500:
--------------------------------------------
    Description: 
  when using the Mocked ResourceResolver  (org.apache.sling.testing.resourceresolver.MockResourceResolver), the root node does not have a primary type, this causes that something like 
 Resource root= resourceResolver.getResource("/");
        assertFalse(root.isResourceType("app/resourceType"));

will throw a NPE, since the node does not have either resourceType or primary type.

Instead, the root node should have a primary type.

  was:
when using the Mocked ResourceResolver  (org.apache.sling.testing.resourceresolver.MockResourceResolver), the root node does not have a primary type, this causes that something like 
 Resource root= resourceResolver.getResource("/");
        assertFalse(root.isResourceType("app/resourceType"));

will throw a NPE, since the node does not have either resourceType or primary type.

Instead, the root node should have a primary type.


> Missing primary type in the root node, when using the mocked resource resolver
> ------------------------------------------------------------------------------
>
>                 Key: SLING-4500
>                 URL: https://issues.apache.org/jira/browse/SLING-4500
>             Project: Sling
>          Issue Type: Bug
>          Components: Testing
>            Reporter: santiago garcía pimentel
>            Priority: Minor
>
>   when using the Mocked ResourceResolver  (org.apache.sling.testing.resourceresolver.MockResourceResolver), the root node does not have a primary type, this causes that something like 
>  Resource root= resourceResolver.getResource("/");
>         assertFalse(root.isResourceType("app/resourceType"));
> will throw a NPE, since the node does not have either resourceType or primary type.
> Instead, the root node should have a primary type.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)