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 br...@apache.org on 2003/12/20 17:36:35 UTC
cvs commit: db-ojb/src/java/org/apache/ojb/broker/core MtoNBroker.java
brj 2003/12/20 08:36:35
Modified: src/java/org/apache/ojb/broker/core MtoNBroker.java
Log:
additional comments on conversion of Number in Key
Revision Changes Path
1.4 +5 -2 db-ojb/src/java/org/apache/ojb/broker/core/MtoNBroker.java
Index: MtoNBroker.java
===================================================================
RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/MtoNBroker.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MtoNBroker.java 20 Dec 2003 16:07:54 -0000 1.3
+++ MtoNBroker.java 20 Dec 2003 16:36:35 -0000 1.4
@@ -323,10 +323,13 @@
// BRJ:
// convert all Numbers to Long to simplify equals
+ // Long(100) is not equal to Integer(100)
+ //
// could lead to problems when Floats are used as key
+ // converting to String could be a better alternative
if (value instanceof Number)
{
- value = new Long(((Number) containers[i].getValue()).longValue());
+ value = new Long(((Number)value).longValue());
}
m_containers[i] = new ValueContainer(value, type);
---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org