You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by th...@apache.org on 2003/02/21 21:48:21 UTC
cvs commit: db-ojb/src/java/org/apache/ojb/broker Identity.java
thma 2003/02/21 12:48:21
Modified: src/java/org/apache/ojb/broker Identity.java
Log:
bug fix in comparing identities, thanks to Steve Clark
Revision Changes Path
1.14 +4 -3 db-ojb/src/java/org/apache/ojb/broker/Identity.java
Index: Identity.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/Identity.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Identity.java 2 Feb 2003 16:19:09 -0000 1.13
+++ Identity.java 21 Feb 2003 20:48:21 -0000 1.14
@@ -349,8 +349,9 @@
result = this.getObjectsClass().equals(id.getObjectsClass());
result = result && (pkValues.length == otherPkValues.length);
for (int i = 0; result && i < pkValues.length; i++)
- {
- result = (pkValues[i] == null && otherPkValues[i] == null) || pkValues[i].equals(otherPkValues[i]);
+ {
+ result = (pkValues[i] == null) ? (otherPkValues[i] == null)
+ : pkValues[i].equals(otherPkValues[i]);
}
}
else