openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fayw...@apache.org
Subject svn commit: r811876 - in /openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access: ./ xml/
Date Sun, 06 Sep 2009 20:29:15 GMT
Author: faywang
Date: Sun Sep  6 20:29:15 2009
New Revision: 811876

URL: http://svn.apache.org/viewvc?rev=811876&view=rev
Log:
fix test case problem for MySQL

Modified:
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub2.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub3.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/MixedFieldSub.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub2.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub3.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/TestXMLExplicitAccess.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub2.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub3.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLMixedFieldSub.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub2.java
    openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub3.java

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub.java
Sun Sep  6 20:29:15 2009
@@ -55,8 +55,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof FieldSub) {
             FieldSub ps = (FieldSub)obj;
-            return super.equals(obj) &&
-                   crtDate.equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub2.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub2.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub2.java
Sun Sep  6 20:29:15 2009
@@ -52,8 +52,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof FieldSub2) {
             FieldSub2 ps = (FieldSub2)obj;
-            return super.equals(obj) &&
-                   crtDate.equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub3.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub3.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub3.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/FieldSub3.java
Sun Sep  6 20:29:15 2009
@@ -54,8 +54,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof FieldSub3) {
             FieldSub3 ps = (FieldSub3)obj;
-            return super.equals(obj) &&
-                   crtDate.equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/MixedFieldSub.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/MixedFieldSub.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/MixedFieldSub.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/MixedFieldSub.java
Sun Sep  6 20:29:15 2009
@@ -59,8 +59,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof MixedFieldSub) {
             MixedFieldSub ps = (MixedFieldSub)obj;
-            return super.equals(obj) &&
-                   getCreateDate().equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub.java
Sun Sep  6 20:29:15 2009
@@ -55,8 +55,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof PropertySub) {
             PropertySub ps = (PropertySub)obj;
-            return super.equals(obj) &&
-                   crtDate.equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub2.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub2.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub2.java
Sun Sep  6 20:29:15 2009
@@ -51,8 +51,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof PropertySub2) {
             PropertySub2 ps = (PropertySub2)obj;
-            return super.equals(obj) &&
-                   crtDate.equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub3.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub3.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub3.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/PropertySub3.java
Sun Sep  6 20:29:15 2009
@@ -54,8 +54,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof PropertySub3) {
             PropertySub3 ps = (PropertySub3)obj;
-            return super.equals(obj) &&
-                   crtDate.equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/TestExplicitAccess.java
Sun Sep  6 20:29:15 2009
@@ -241,7 +241,7 @@
             (PropertySub)qry.getSingleResult();
         assertEquals(ps, ps2);
         assertEquals(ps2.getName(), "AbsMappedSuperName");
-        assertEquals(ps2.getCreateDate(), now);
+        assertEquals(ps2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("PropertySub.badQuery");
@@ -290,7 +290,7 @@
             (FieldSub)qry.getSingleResult();
         assertEquals(fs, fs2);
         assertEquals(fs2.getName(), "AbsMappedSuperName");
-        assertEquals(fs2.getCreateDate(), now);
+        assertEquals(fs2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("FieldSub.badQuery");
@@ -340,7 +340,7 @@
             (PropertySub2)qry.getSingleResult();
         assertEquals(ps, ps2);
         assertEquals(ps2.getName(), "MappedSuperName");
-        assertEquals(ps2.getCreateDate(), now);
+        assertEquals(ps2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("PropertySub2.badQuery");
@@ -390,7 +390,7 @@
             (FieldSub2)qry.getSingleResult();
         assertEquals(fs, fs2);
         assertEquals(fs2.getName(), "MappedSuperName");
-        assertEquals(fs2.getCreateDate(), now);
+        assertEquals(fs2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("FieldSub2.badQuery");
@@ -442,7 +442,7 @@
             (MixedFieldSub)qry.getSingleResult();
         assertEquals(fs, fs2);
         assertEquals(fs2.getName(), "MixedMappedSuperName");
-        assertEquals(fs2.getCreateDate(), now);
+        assertEquals(fs2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("MixedFieldSub.badQuery");
@@ -497,7 +497,7 @@
             (FieldSub3)qry.getSingleResult();
         assertEquals(fs, fs2);
         assertEquals(fs2.getName(), "EntitySuperName");
-        assertEquals(fs2.getCreateDate(), now);
+        assertEquals(fs2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("FieldSub3.badQuery");
@@ -576,7 +576,7 @@
             (PropertySub3)qry.getSingleResult();
         assertEquals(ps, ps2);
         assertEquals(ps2.getName(), "EntitySuperName");
-        assertEquals(ps2.getCreateDate(), now);
+        assertEquals(ps2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("PropertySub3.badQuery");

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/TestXMLExplicitAccess.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/TestXMLExplicitAccess.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/TestXMLExplicitAccess.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/TestXMLExplicitAccess.java
Sun Sep  6 20:29:15 2009
@@ -234,7 +234,7 @@
             (XMLPropertySub)qry.getSingleResult();
         assertEquals(ps, ps2);
         assertEquals(ps2.getName(), "AbsMappedSuperName");
-        assertEquals(ps2.getCreateDate(), now);
+        assertEquals(ps2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("XMLPropertySub.badQuery");
@@ -290,7 +290,7 @@
             (XMLFieldSub)qry.getSingleResult();
         assertEquals(fs, fs2);
         assertEquals(fs2.getName(), "AbsMappedSuperName");
-        assertEquals(fs2.getCreateDate(), now);
+        assertEquals(fs2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("XMLFieldSub.badQuery");
@@ -347,7 +347,7 @@
             (XMLPropertySub2)qry.getSingleResult();
         assertEquals(ps, ps2);
         assertEquals(ps2.getName(), "MappedSuperName");
-        assertEquals(ps2.getCreateDate(), now);
+        assertEquals(ps2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("XMLPropertySub2.badQuery");
@@ -398,7 +398,7 @@
             (XMLFieldSub2)qry.getSingleResult();
         assertEquals(fs, fs2);
         assertEquals(fs2.getName(), "MappedSuperName");
-        assertEquals(fs2.getCreateDate(), now);
+        assertEquals(fs2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("XMLFieldSub2.badQuery");
@@ -450,7 +450,7 @@
             (XMLMixedFieldSub)qry.getSingleResult();
         assertEquals(fs, fs2);
         assertEquals(fs2.getName(), "XMLMixedMappedSuperName");
-        assertEquals(fs2.getCreateDate(), now);
+        assertEquals(fs2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("XMLMixedFieldSub.badQuery");
@@ -505,7 +505,7 @@
             (XMLFieldSub3)qry.getSingleResult();
         assertEquals(fs, fs2);
         assertEquals(fs2.getName(), "EntitySuperName");
-        assertEquals(fs2.getCreateDate(), now);
+        assertEquals(fs2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("XMLFieldSub3.badQuery");
@@ -584,7 +584,7 @@
             (XMLPropertySub3)qry.getSingleResult();
         assertEquals(ps, ps2);
         assertEquals(ps2.getName(), "EntitySuperName");
-        assertEquals(ps2.getCreateDate(), now);
+        assertEquals(ps2.getCreateDate().toString(), now.toString());
 
         try {
             qry = em.createNamedQuery("XMLPropertySub3.badQuery");

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub.java
Sun Sep  6 20:29:15 2009
@@ -37,8 +37,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof XMLFieldSub) {
             XMLFieldSub ps = (XMLFieldSub)obj;
-            return super.equals(obj) &&
-                   crtDate.equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub2.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub2.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub2.java
Sun Sep  6 20:29:15 2009
@@ -35,8 +35,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof XMLFieldSub2) {
             XMLFieldSub2 ps = (XMLFieldSub2)obj;
-            return super.equals(obj) &&
-                   crtDate.equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub3.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub3.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub3.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLFieldSub3.java
Sun Sep  6 20:29:15 2009
@@ -35,8 +35,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof XMLFieldSub3) {
             XMLFieldSub3 ps = (XMLFieldSub3)obj;
-            return super.equals(obj) &&
-                   crtDate.equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLMixedFieldSub.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLMixedFieldSub.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLMixedFieldSub.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLMixedFieldSub.java
Sun Sep  6 20:29:15 2009
@@ -37,8 +37,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof XMLMixedFieldSub) {
             XMLMixedFieldSub ps = (XMLMixedFieldSub)obj;
-            return super.equals(obj) &&
-                   getCreateDate().equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub.java
Sun Sep  6 20:29:15 2009
@@ -37,8 +37,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof XMLPropertySub) {
             XMLPropertySub ps = (XMLPropertySub)obj;
-            return super.equals(obj) &&
-                   crtDate.equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub2.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub2.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub2.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub2.java
Sun Sep  6 20:29:15 2009
@@ -33,8 +33,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof XMLPropertySub2) {
             XMLPropertySub2 ps = (XMLPropertySub2)obj;
-            return super.equals(obj) &&
-                   crtDate.equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }

Modified: openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub3.java
URL: http://svn.apache.org/viewvc/openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub3.java?rev=811876&r1=811875&r2=811876&view=diff
==============================================================================
--- openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub3.java
(original)
+++ openjpa/trunk/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/access/xml/XMLPropertySub3.java
Sun Sep  6 20:29:15 2009
@@ -35,8 +35,10 @@
     public boolean equals(Object obj) {
         if (obj instanceof XMLPropertySub3) {
             XMLPropertySub3 ps = (XMLPropertySub3)obj;
-            return super.equals(obj) &&
-                   crtDate.equals(ps.getCreateDate());
+            String crtDateString = ps.getCreateDate() != null ? ps.getCreateDate().toString()
: null;
+            if (!crtDate.toString().equals(crtDateString))
+                return false;
+            return super.equals(obj);
         }
         return false;
     }



Mime
View raw message