Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2018-05-24 09:06:22 -0400
committerEike Stepper2018-05-24 09:06:22 -0400
commit3de26b4221fb7994160d8caf5bb6c891f70c6b22 (patch)
tree5de9a0f6465bd3a6ae1941c0d77215e8f7dec244 /plugins/org.eclipse.emf.cdo.server.net4j
parent9d8a9199fbadbb125a1468d29b2480ca138696df (diff)
downloadcdo-3de26b4221fb7994160d8caf5bb6c891f70c6b22.tar.gz
cdo-3de26b4221fb7994160d8caf5bb6c891f70c6b22.tar.xz
cdo-3de26b4221fb7994160d8caf5bb6c891f70c6b22.zip
[521028] CommitTransactionIndication causes small memory leak
https://bugs.eclipse.org/bugs/show_bug.cgi?id=521028
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server.net4j')
-rw-r--r--plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java
index 7a185fbe13..3d101ab9fd 100644
--- a/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server.net4j/src/org/eclipse/emf/cdo/server/internal/net4j/protocol/CommitTransactionIndication.java
@@ -22,6 +22,7 @@ import org.eclipse.emf.cdo.common.id.CDOIDUtil;
import org.eclipse.emf.cdo.common.lock.CDOLockState;
import org.eclipse.emf.cdo.common.lock.CDOLockUtil;
import org.eclipse.emf.cdo.common.model.EMFUtil;
+import org.eclipse.emf.cdo.common.model.EMFUtil.ExtResourceSet;
import org.eclipse.emf.cdo.common.protocol.CDODataInput;
import org.eclipse.emf.cdo.common.protocol.CDODataOutput;
import org.eclipse.emf.cdo.common.protocol.CDOProtocol.CommitNotificationInfo;
@@ -51,7 +52,6 @@ import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EcorePackage;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.xmi.impl.EcoreResourceFactoryImpl;
import java.io.IOException;
@@ -474,16 +474,9 @@ public class CommitTransactionIndication extends CDOServerIndicationWithMonitori
private ResourceSet createResourceSet(InternalCDOPackageRegistry packageRegistry)
{
- ResourceSet resourceSet = new ResourceSetImpl()
- {
- @Override
- protected void demandLoad(Resource resource) throws IOException
- {
- // Do nothing: we don't want this ResourceSet to attempt demand-loads.
- }
- };
-
Resource.Factory resourceFactory = new EcoreResourceFactoryImpl();
+
+ ResourceSet resourceSet = new ExtResourceSet(true, false);
resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put("*", resourceFactory); //$NON-NLS-1$
resourceSet.setPackageRegistry(packageRegistry);
return resourceSet;

Back to the top