summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-09-15 12:56:09 (EDT)
committerEike Stepper2007-09-15 12:56:09 (EDT)
commit4b05637e491b7c5df15e2751b6bd196b2c2839df (patch)
treea0b845cc4a222b99c924954b79f999b5f0fc7c46
parent098ddab1aafe9e4121b3bbeb42b2cd15e2ba1535 (diff)
downloadcdo-4b05637e491b7c5df15e2751b6bd196b2c2839df.zip
cdo-4b05637e491b7c5df15e2751b6bd196b2c2839df.tar.gz
cdo-4b05637e491b7c5df15e2751b6bd196b2c2839df.tar.bz2
[203426] EContentAdapter resolve instances of our Resource
https://bugs.eclipse.org/bugs/show_bug.cgi?id=203426
-rw-r--r--plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ContentAdapterTest.java13
-rw-r--r--plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Channel.java5
2 files changed, 10 insertions, 8 deletions
diff --git a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ContentAdapterTest.java b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ContentAdapterTest.java
index 6ceb533..f6cb888 100644
--- a/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ContentAdapterTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests/src/org/eclipse/emf/cdo/tests/ContentAdapterTest.java
@@ -20,7 +20,9 @@ import org.eclipse.emf.cdo.protocol.analyzer.CDOFetchRule;
import org.eclipse.emf.cdo.tests.model1.Model1Factory;
import org.eclipse.emf.cdo.tests.model1.Supplier;
+import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EContentAdapter;
import org.eclipse.emf.internal.cdo.CDOSessionImpl;
@@ -62,17 +64,16 @@ public class ContentAdapterTest extends AbstractCDOTest
CDOTransaction transaction = session.openTransaction(new ResourceSetImpl());
CDOResource resource = transaction.createResource("/test2");
- resource.eAdapters().add(contentAdapter);
+ // resource.eAdapters().add(contentAdapter);
Supplier supplier = Model1Factory.eINSTANCE.createSupplier();
resource.getContents().add(supplier);
- notified[0] = false;
+ // notified[0] = false;
// contentAdapter should receive notification
supplier.setName("HELLO");
- assertEquals(true, notified[0]);
- supplierID = supplier.cdoID();
+ // assertEquals(true, notified[0]);
transaction.commit();
supplierID = supplier.cdoID();
@@ -90,8 +91,10 @@ public class ContentAdapterTest extends AbstractCDOTest
CDOResource resource = transaction.getResource("/test2");
// I don't want to fetch my objects!!
- resource.eAdapters().add(contentAdapter);
+ EList<Adapter> adapters = resource.eAdapters();
+ adapters.add(contentAdapter);
+ // XXX FAILURE HERE!!!
// By adding an adapter, we shouldn`t fetch objects
assertEquals(false, info.getFetchedIDs().contains(supplierID));
diff --git a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Channel.java b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Channel.java
index adef9f0..1d8262b 100644
--- a/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Channel.java
+++ b/plugins/org.eclipse.net4j/src/org/eclipse/internal/net4j/Channel.java
@@ -221,11 +221,10 @@ public class Channel extends Lifecycle implements IChannel, IBufferProvider
}
else
{
- // receiveSerializer = new AsynchronousWorkSerializer(receiveExecutor);
-
// CompletionWorkSerializer throws "One command already pending"
// receiveSerializer = new CompletionWorkSerializer();
-
+ // receiveSerializer = new AsynchronousWorkSerializer(receiveExecutor);
+ // receiveSerializer = new SynchronousWorkSerializer();
receiveSerializer = new QueueWorkerWorkSerializer();
}
}