You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (JIRA)" <ji...@apache.org> on 2012/05/31 10:50:22 UTC

[jira] [Created] (SLING-2498) MapEntries is unusable if something fails during init

Carsten Ziegeler created SLING-2498:
---------------------------------------

             Summary: MapEntries is unusable if something fails during init
                 Key: SLING-2498
                 URL: https://issues.apache.org/jira/browse/SLING-2498
             Project: Sling
          Issue Type: Bug
          Components: JCR
    Affects Versions: JCR Resource 2.1.0
            Reporter: Carsten Ziegeler
            Assignee: Carsten Ziegeler
             Fix For: JCR Resource 2.1.2


If the init fails, the exception is catched, however the map entries is unusable and resutls in a NPE:

java.lang.NullPointerException
	at org.apache.sling.jcr.resource.internal.helper.MapEntries$MapEntryIterator.<init>(MapEntries.java:699)
	at org.apache.sling.jcr.resource.internal.helper.MapEntries.getResolveMapsIterator(MapEntries.java:304)
	at org.apache.sling.jcr.resource.internal.JcrResourceResolver.resolve(JcrResourceResolver.java:427)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (SLING-2498) MapEntries is unusable if something fails during init

Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SLING-2498?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved SLING-2498.
-------------------------------------

    Resolution: Fixed

Added a default entry for the global key to avoid the NPE
                
> MapEntries is unusable if something fails during init
> -----------------------------------------------------
>
>                 Key: SLING-2498
>                 URL: https://issues.apache.org/jira/browse/SLING-2498
>             Project: Sling
>          Issue Type: Bug
>          Components: JCR
>    Affects Versions: JCR Resource 2.1.0
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>             Fix For: JCR Resource 2.1.2
>
>
> If the init fails, the exception is catched, however the map entries is unusable and resutls in a NPE:
> java.lang.NullPointerException
> 	at org.apache.sling.jcr.resource.internal.helper.MapEntries$MapEntryIterator.<init>(MapEntries.java:699)
> 	at org.apache.sling.jcr.resource.internal.helper.MapEntries.getResolveMapsIterator(MapEntries.java:304)
> 	at org.apache.sling.jcr.resource.internal.JcrResourceResolver.resolve(JcrResourceResolver.java:427)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira