jaxp/src/java.xml/share/classes/com/sun/org/apache/xpath/internal/compiler/FunctionTable.java
equal
deleted
inserted
replaced
376 { |
376 { |
377 |
377 |
378 int funcIndex; |
378 int funcIndex; |
379 Object funcIndexObj = getFunctionID(name); |
379 Object funcIndexObj = getFunctionID(name); |
380 |
380 |
|
381 if (func != null && !Function.class.isAssignableFrom(func)) { |
|
382 throw new ClassCastException(func.getName() |
|
383 + " cannot be cast to " |
|
384 + Function.class.getName()); |
|
385 } |
|
386 |
381 if (null != funcIndexObj) |
387 if (null != funcIndexObj) |
382 { |
388 { |
383 funcIndex = ((Integer) funcIndexObj).intValue(); |
389 funcIndex = ((Integer) funcIndexObj).intValue(); |
384 |
390 |
385 if (funcIndex < NUM_BUILT_IN_FUNCS){ |
391 if (funcIndex < NUM_BUILT_IN_FUNCS){ |