For == use .equals after unwrapping.

This commit is contained in:
nboyd%atg.com 2001-01-05 20:00:47 +00:00
parent 07b81a65d3
commit 0298ab90eb
2 changed files with 4 additions and 10 deletions

View File

@ -1582,11 +1582,8 @@ public class ScriptRuntime {
if (typeX == ScriptableClass) {
if (x == y)
return true;
if (x instanceof Wrapper &&
y instanceof Wrapper)
{
return ((Wrapper) x).unwrap() ==
((Wrapper) y).unwrap();
if (x instanceof Wrapper && y instanceof Wrapper) {
return ((Wrapper) x).unwrap().equals(((Wrapper) y).unwrap());
}
return false;
}

View File

@ -1582,11 +1582,8 @@ public class ScriptRuntime {
if (typeX == ScriptableClass) {
if (x == y)
return true;
if (x instanceof Wrapper &&
y instanceof Wrapper)
{
return ((Wrapper) x).unwrap() ==
((Wrapper) y).unwrap();
if (x instanceof Wrapper && y instanceof Wrapper) {
return ((Wrapper) x).unwrap().equals(((Wrapper) y).unwrap());
}
return false;
}