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:
parent
5bd31d7e20
commit
d9c6ed0fb7
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user