Hello,

below I send you a patch for a NullPointer Exception problem that occured for me when
using castor JDO with multiply-column keys and activated logging.


Index: Complex.java
===================================================================
RCS file: /cvs/castor/castor/src/main/org/exolab/castor/persist/spi/Complexjava,v
retrieving revision 1.2
diff -u -p -d -r1.2 Complex.java
--- Complex.java        3 Mar 2003 09:57:17 -0000       1.2
+++ Complex.java        8 Jan 2004 08:32:24 -0000
@@ -223,8 +223,10 @@ public class Complex {
         sb.append("<");
         for( int i=0; i < _size; i++ ) {
             if ( i != 0 ) sb.append(",");
-            sb.append(get(i));
-            sb.append("("+get(i).hashCode()+")");
+           Object obj = get(i);
+            sb.append(obj);
+           if (obj != null)
+               sb.append("("+obj.hashCode()+")");
         }
         sb.append(">");
         return sb.toString();


--- 
Martin Fuchs
[EMAIL PROTECTED]

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to