[ http://issues.apache.org/jira/browse/XALANJ-1916?page=all ]

Brian Minchau updated XALANJ-1916:
----------------------------------

    Fix Version: 2.7

> TraceManager.fireTraceEvent() can cause Null Pointer Exception
> --------------------------------------------------------------
>
>          Key: XALANJ-1916
>          URL: http://issues.apache.org/jira/browse/XALANJ-1916
>      Project: XalanJ2
>         Type: Bug
>   Components: Trace-facility
>     Versions: 2.6
>  Environment: Operating System: All
> Platform: All
>     Reporter: Cheng-Yee Lin
>     Assignee: Brian Minchau
>      Fix For: 2.7
>  Attachments: patch.txt
>
> The code segment for fireTraceEvent() looks like:
>   public void fireTraceEvent(ElemTemplateElement styleNode)
>   {
>     if (hasTraceListeners())
>     {
>       int sourceNode = m_transformer.getXPathContext().getCurrentNode();
>       Node source = m_transformer.getXPathContext().getDTM(
>         sourceNode).getNode(sourceNode);
>       fireTraceEvent(new TracerEvent(m_transformer, source, 
>                      m_transformer.getMode(),  /*sourceNode, mode,*/
>                                      styleNode));
>     }
>   }
> The call m_transformer.getXPathContext().getDTM(sourceNode) can resolve to 
> DTMManagerDefault.getDTM() which, in turn, can return "null".  Without 
> checking this return value before invoking its getNode() method would result 
> in NPE.
> This looks to be the same issue as in 30169.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to