[seam-commits] Seam SVN: r11850 - modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Thu Dec 17 03:11:40 EST 2009
Author: shane.bryzak at jboss.com
Date: 2009-12-17 03:11:39 -0500 (Thu, 17 Dec 2009)
New Revision: 11850
Modified:
modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js
Log:
minor
Modified: modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js
===================================================================
--- modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js 2009-12-17 07:52:23 UTC (rev 11849)
+++ modules/remoting/trunk/src/main/resources/org/jboss/seam/remoting/remote.js 2009-12-17 08:11:39 UTC (rev 11850)
@@ -697,7 +697,13 @@
case "string":
return typeof(v2) == "string" && v1 == v2;
case "object":
- if (v1 instanceof Array) {
+ if (v1 instanceof Date) {
+ return (v2 instanceof Date) && v1.getTime() == v2.getTime();
+ }
+ else if (Seam.getBeanType(v1) {
+ return this.getSourceObject(v1) == v2;
+ }
+ else if (v1 instanceof Array) {
if (!(v2 instanceof Array)) return false;
if (v1.length != v2.length) return false;
for (var i=0; i<v1.length; i++) {
@@ -705,20 +711,15 @@
}
return true;
}
- else if (v1 instanceof Date) {
- return (v2 instanceof Date) && v1.getTime() == v2.getTime();
- }
else if (v1 instanceof Seam.Map) {
if (!(v2 instanceof Seam.Map)) return false;
- var k1 = v1.keySet;
- var k2 = v2.keySet;
- if (!k1.length == k2.length) return false;
+ if (v1.elements.length != v2.elements.length) return false;
+ var k1 = v1.keySet();
+ var k2 = v2.keySet();
for (var i=0; i<k1.length; i++) {
- var e = eq(v1.get(k1[i]), v2.get(k2[i]));
- if (!e) {
- if (Seam.getBeanType(k1[i])) {
- e = eq(v1.get(k1[i]), v2.get(this.getSourceObject(k1[i]));
- }
+ var e = eq(v1.get(k1[i]), v2.get(k1[i]));
+ if (!e && Seam.getBeanType(k1[i])) {
+ e = eq(v1.get(k1[i]), v2.get(this.getSourceObject(k1[i]));
}
if (!e) {
for (var j=0; j<k2.length; j++) {
@@ -731,9 +732,6 @@
if (!e) return false;
}
}
- else if (Seam.getBeanType(v1) {
- return this.getSourceObject(v1) == v2;
- }
}
return false;
}
More information about the seam-commits
mailing list