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

*** shadow/2175 Thu Jun 14 02:58:22 2001
--- shadow/2175.tmp.18588       Thu Jun 14 02:58:22 2001
***************
*** 0 ****
--- 1,31 ----
+ +============================================================================+
+ | non unique method key for java extensions                                  |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2175                        Product: XalanJ2                 |
+ |       Status: NEW                         Version: 2.0.x                   |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Blocker                  OS/Version: Windows NT/2K           |
+ |     Priority: Other                     Component: org.apache.xpath        |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: [EMAIL PROTECTED]                                     |
+ |  Reported By: [EMAIL PROTECTED]                                  |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ The method org.apache.xpath.compiler.Compiler.compileExtension(int opPos)
+ creates a non unique methodKey (should be unique!!) for the class FuncExtFunction!
+ 
+ This method key reached through to ExtensionHandlerJavaClass.callFunction where it 
+is used to cache the extension function. Because this key is not unique as it should 
+be, it happens that the wrong extension method is called!!!!
+ 
+ => Eighter the cache from ExtensionHandlerJava is changed, so it accepts that the 
+key is not unique, or the Cmpiler needs to create a really unique key.
+ 
+ I have changed the code in the compiler like that:
+   Function extension = new FuncExtFunction(ns, funcName,
+    // Create a method key, for faster lookup.
+     String.valueOf(opPos) + String.valueOf(hashCode()) + funcName);
+ 
+ This seems to work, but as my knowledge in the xalan code is poor I don't know if 
+this works for evry case.
+ 
+ Roman
\ No newline at end of file

Reply via email to