http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2523

*** shadow/2523 Mon Jul  9 16:02:26 2001
--- shadow/2523.tmp.16491       Mon Jul  9 16:02:26 2001
***************
*** 0 ****
--- 1,36 ----
+ +============================================================================+
+ | org.apache.xalan.lib.Extension.evaluate() throws exception all the time    |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2523                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: 2.2.x                   |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Blocker                  OS/Version: Windows NT/2K           |
+ |     Priority: Other                     Component: org.apache.xalan.lib    |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: [EMAIL PROTECTED]                                     |
+ |  Reported By: [EMAIL PROTECTED]                                          |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL: http://http://                                               |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ the following is a line of code in the evaluate() method
+ where the error occurs:
+ 
+   if (myContext instanceof XPathContext)
+ 
+ This conditional statement will ALWAYS fail because myContext
+ is not an instance of XPathContext but actually an instance of:
+ 
+   org.apache.xpath.XPathContext$XPathExpressionContext
+ 
+ XPathExpressionContext is an 
+ inner class of XPathContext. The above line should replace the XPathContext in 
+ the conditional statement.
+ 
+ Also, within the if statement body, the following cast statement:
+ 
+   XPathContext xctxt = (XPathContext) myContext;
+ 
+ will also fail.  myContext should be cast to the 'this' pointer of the 
+ outer class.

Reply via email to