cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmen...@apache.org
Subject svn commit: r506845 - /cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/tests/java/org/apache/cayenne/xml/TestObject.java
Date Tue, 13 Feb 2007 03:41:30 GMT
Author: kmenard
Date: Mon Feb 12 19:41:30 2007
New Revision: 506845

URL: http://svn.apache.org/viewvc?view=rev&rev=506845
Log:
Cleaning up a bit.

Modified:
    cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/tests/java/org/apache/cayenne/xml/TestObject.java

Modified: cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/tests/java/org/apache/cayenne/xml/TestObject.java
URL: http://svn.apache.org/viewvc/cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/tests/java/org/apache/cayenne/xml/TestObject.java?view=diff&rev=506845&r1=506844&r2=506845
==============================================================================
--- cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/tests/java/org/apache/cayenne/xml/TestObject.java
(original)
+++ cayenne/main/branches/STABLE-2.0/cayenne/cayenne-java/src/tests/java/org/apache/cayenne/xml/TestObject.java
Mon Feb 12 19:41:30 2007
@@ -126,6 +126,10 @@
 
     public void decodeFromXML(XMLDecoder decoder) {
         
+        if (null != decoder.decodeObject("parent")) {
+            parent = (TestObject) decoder.decodeObject("parent");
+        }
+        
         if (null != decoder.decodeInteger("age")) {
             age = decoder.decodeInteger("age").intValue();
         }
@@ -134,11 +138,6 @@
             open = decoder.decodeBoolean("open").booleanValue();
         }
         
-        // "parent" must come first to fully test 1-to-1 relationships, per CAY-597.
-        if (null != decoder.decodeObject("parent")) {
-            parent = (TestObject) decoder.decodeObject("parent");
-        }
-
         name = decoder.decodeString("name");
         children = (List) decoder.decodeObject("children");
     }



Mime
View raw message