Re: NullPointerException in _popComponentFromContext -- [WORKAROUND]
Re: NullPointerException in _popComponentFromContext -- [WORKAROUND]
- Subject: Re: NullPointerException in _popComponentFromContext -- [WORKAROUND]
- From: Mike Schrag <email@hidden>
- Date: Fri, 26 Jun 2009 11:23:17 -0400
My theory is that the performParentAction() changes the context's current component with the intention to restore it afterwards. But an exception may be occurring in a section of the code in performParentAction() which is not properly wrapped with an exception handler and so we end up with the wrong current component in the context.
So it is definitely the case that performParentAction doesn't reset the current component in a finally block (which it seems like it should). However, it seems to me the only way this can fail is by throwing an exception OUT of performParentAction (inside the action that was called), which should manifest in YOUR code. There's not way I can see that you don't get a reset of the component without you also getting an exception. Is your code that calls performParentAction wrapped in a swallowing catch?
It seems to me you're putting in a really weird hack and hiding the root cause of your problem which might just be hanging around to screw you again later in another weird way.
I would figure out WHERE and WHY you aren't getting an exception out of performParentAction. You should be able to override performParentAction in your base component or in ERXComponent and wrap it in an exception handler so you can always see when that dies and then you can possibly trace who's swallowing it.
ms |
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden