tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fra...@apache.org
Subject svn commit: r499136 - in /incubator/tuscany/java/sdo/impl/src: main/java/org/apache/tuscany/sdo/impl/ main/java/org/apache/tuscany/sdo/util/resource/ test/java/org/apache/tuscany/sdo/test/
Date Tue, 23 Jan 2007 21:10:07 GMT
Author: frankb
Date: Tue Jan 23 13:10:06 2007
New Revision: 499136

URL: http://svn.apache.org/viewvc?view=rev&rev=499136
Log:
More TUSCANY-153

Modified:
    incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummaryImpl.java
    incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/ChangeSummaryStreamSerializer.java
    incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryPropertyTestCase.java

Modified: incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummaryImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummaryImpl.java?view=diff&rev=499136&r1=499135&r2=499136
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummaryImpl.java
(original)
+++ incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/impl/ChangeSummaryImpl.java
Tue Jan 23 13:10:06 2007
@@ -749,6 +749,8 @@
   
   public DataObject getOldDataObject(DataObject dataObject)
   {
+    //TODO: Fix this method. Currently, it has the side effect of undoing the unset of contained
children references
+    //      of root deleted objects - i.e., when featureChange.apply(oldDataObject) is called.
     EObject oldDataObject = EcoreUtil.copy((EObject)dataObject);
 
     List changes = (List)getObjectChanges().get(dataObject);

Modified: incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/ChangeSummaryStreamSerializer.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/ChangeSummaryStreamSerializer.java?view=diff&rev=499136&r1=499135&r2=499136
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/ChangeSummaryStreamSerializer.java
(original)
+++ incubator/tuscany/java/sdo/impl/src/main/java/org/apache/tuscany/sdo/util/resource/ChangeSummaryStreamSerializer.java
Tue Jan 23 13:10:06 2007
@@ -541,14 +541,17 @@
         Iterator iterator = deletedDataObjects.iterator();
         if (iterator.hasNext()) {
             lengthDeleted = -1;
-            StringBuffer buffer = new StringBuffer();
-            while (true) {
+            StringBuffer buffer = null;
+            do {
                 dataObject = (DataObject) iterator.next();
+                if (skipDeletedModification(changeSummary.getOldContainer(dataObject)))
+                    continue;
+                if (buffer == null)
+                    buffer = new StringBuffer();
+                else
+                    buffer.append(' ');
                 buffer.append(refDeleted());
-                if (!iterator.hasNext())
-                    break;
-                buffer.append(' ');
-            }
+            } while (iterator.hasNext());
             writer.writeAttribute(DELETE_ATTRIBUTE, buffer.toString());
         }
 

Modified: incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryPropertyTestCase.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryPropertyTestCase.java?view=diff&rev=499136&r1=499135&r2=499136
==============================================================================
--- incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryPropertyTestCase.java
(original)
+++ incubator/tuscany/java/sdo/impl/src/test/java/org/apache/tuscany/sdo/test/ChangeSummaryPropertyTestCase.java
Tue Jan 23 13:10:06 2007
@@ -92,7 +92,7 @@
         hc.getXMLHelper().save(quote, TEST_NAMESPACE, "stockQuote", baos);
         //hc.getXMLHelper().save(quote, TEST_NAMESPACE, "stockQuote", System.out);
 
-        //assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()),
getClass().getResource(TEST_DATA_BEFORE_UNDO)));
+        assertTrue(TestUtil.equalXmlFiles(new ByteArrayInputStream(baos.toByteArray()), getClass().getResource(TEST_DATA_BEFORE_UNDO)));
         
         // Undo all changes and then serialize the resulting data graph again
         //



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message