[
https://issues.apache.org/jira/browse/MYFACES-3119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13027167#comment-13027167
]
Matt Benson commented on MYFACES-3119:
--------------------------------------
Leo: thanks for the response. I am not clear on your solution, however. Note
that the PhaseListener is only used to apply the ComponentSystemEventListener
to the view, so in my opinion I *am* using a PreRenderViewEvent instead of a
PhaseListener. Is it your contention that the subscribe/unsubscribe parts of
the UIComponent(Base) API should *not* be used directly by Java code? That
seems wrong to me. Without getting too deep into partial state and delta
changes, with which I am yet not so familiar, my comprehension of the
*immediate* cause of the NPE is that the method in question:
* checks instance variable _systemEventListenerClassMap, creating a new
instance if null
* assumes that the map will contain a non-null value for every key in the
passed-in map
How can the newly created instance be expected to have the same keyset as the
previously saved map?
> NullPointerException in
> UIComponentBase.restoreDeltaSystemEventListenerClassMap() when UIViewRoot
> subscribed to PostAddToViewEvent
> ----------------------------------------------------------------------------------------------------------------------------------
>
> Key: MYFACES-3119
> URL: https://issues.apache.org/jira/browse/MYFACES-3119
> Project: MyFaces Core
> Issue Type: Bug
> Components: General
> Affects Versions: 2.0.5
> Reporter: Matt Benson
> Assignee: Leonardo Uribe
> Attachments: mf3119.patch.txt, mf3119.tar.gz, mf3119.tar.gz
>
>
> As reported in MYFACES-2466 (whose summary I copied here), I am encountering
> the NPE on the access of holderList in what is currently line 1917 of
> UIComponentBase whenever I use a ComponentSystemEventListener on UIViewRoot.
> Specifically I am subscribing to PreRenderViewEvent and the problem occurs
> restoring the view regardless of whether I unsubscribe the listener e.g.
> after RENDER_RESPONSE.
> More information:
> _systemEventListenerClassMap is null when the method is called, thus the map
> is reinstantiated so of course the value looked up and assigned to holderList
> is null.
> Now I have to go use Mojarra until this is fixed. :(
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira