Fix build problem in batik:

[javac] Compiling 1427 source files to /data/gump/xml-batik/classes
 [javac] /data/gump/xml-batik/sources/org/apache/batik/script/rhino/EventTargetWrapper.java:81:
coerceType(java.lang.Class,java.lang.Object,boolean)
in org.mozilla.javascript.NativeJavaObject cannot be applied to
(java.lang.Class,java.lang.Object)


git-svn-id: svn://10.0.0.236/trunk@114372 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
nboyd%atg.com 2002-02-13 03:07:31 +00:00
parent 5bd31d7e20
commit d9c6ed0fb7

View File

@ -502,12 +502,22 @@ public class NativeJavaObject implements Scriptable, Wrapper, Externalizable {
}
}
/**
* Not intended for public use. Callers should use the
* public API Context.toType.
* @see org.mozilla.javascript.Context#toType.
* @deprecated as of 1.5 Release 4
*/
public static Object coerceType(Class type, Object value) {
return coerceType(type, value, true);
}
/**
* Type-munging for field setting and method invocation.
* Conforms to LC3 specification
*/
public static Object coerceType(Class type, Object value,
boolean useErrorHandler)
static Object coerceType(Class type, Object value,
boolean useErrorHandler)
{
if (value != null && value.getClass() == type) {
return value;