Fall through to number case only after considering character and boolean

independently.


git-svn-id: svn://10.0.0.236/trunk@29804 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
norris%netscape.com
1999-04-29 20:51:50 +00:00
parent 80f6a28c08
commit b9b80ba4a6
2 changed files with 4 additions and 4 deletions

View File

@@ -218,8 +218,6 @@ public class NativeJavaObject implements Scriptable, Wrapper {
// if to is a primitive, from must be assignableFrom
// the wrapper class.
if (to.isPrimitive()) {
if (ScriptRuntime.NumberClass.isAssignableFrom(from))
return CONVERSION_TRIVIAL;
if (to == Boolean.TYPE)
return from == ScriptRuntime.BooleanClass
? CONVERSION_TRIVIAL
@@ -234,6 +232,8 @@ public class NativeJavaObject implements Scriptable, Wrapper {
}
return CONVERSION_NONE;
}
if (ScriptRuntime.NumberClass.isAssignableFrom(from))
return CONVERSION_TRIVIAL;
return CONVERSION_NONTRIVIAL;
}
if (to == ScriptRuntime.CharacterClass) {

View File

@@ -218,8 +218,6 @@ public class NativeJavaObject implements Scriptable, Wrapper {
// if to is a primitive, from must be assignableFrom
// the wrapper class.
if (to.isPrimitive()) {
if (ScriptRuntime.NumberClass.isAssignableFrom(from))
return CONVERSION_TRIVIAL;
if (to == Boolean.TYPE)
return from == ScriptRuntime.BooleanClass
? CONVERSION_TRIVIAL
@@ -234,6 +232,8 @@ public class NativeJavaObject implements Scriptable, Wrapper {
}
return CONVERSION_NONE;
}
if (ScriptRuntime.NumberClass.isAssignableFrom(from))
return CONVERSION_TRIVIAL;
return CONVERSION_NONTRIVIAL;
}
if (to == ScriptRuntime.CharacterClass) {