Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-02-21 03:46:14 -0500
committerEike Stepper2013-02-21 03:46:14 -0500
commitef83ed9342e3f2f852bbdfef3592ef3b35b48d49 (patch)
tree743cba016162cc36ca4c00c23b8b122ad24b88bb
parent858f85078a6567ed5dfec0306f6671231a4c891d (diff)
downloadcdo-ef83ed9342e3f2f852bbdfef3592ef3b35b48d49.tar.gz
cdo-ef83ed9342e3f2f852bbdfef3592ef3b35b48d49.tar.xz
cdo-ef83ed9342e3f2f852bbdfef3592ef3b35b48d49.zip
[400892] Intern all CDOIDs drops/I20130301-0411
https://bugs.eclipse.org/bugs/show_bug.cgi?id=400892
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/id/CDOIDUtil.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDOListImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDOListWithElementProxiesImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataInputImpl.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/BaseCDORevision.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/DelegatingCDORevision.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/InternalCDOList.java11
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/StubCDORevision.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/WrappedHibernateList.java9
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ref/ReferenceValueMap2.java1
10 files changed, 25 insertions, 23 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/id/CDOIDUtil.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/id/CDOIDUtil.java
index e305ff194e..d649a8c394 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/id/CDOIDUtil.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/common/id/CDOIDUtil.java
@@ -60,6 +60,9 @@ public final class CDOIDUtil
{
}
+ /**
+ * @since 4.2
+ */
public static <V> Map<CDOID, V> createMap()
{
return new HashMap<CDOID, V>();
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDOListImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDOListImpl.java
index 8049d4f8c3..78bdf8346d 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDOListImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDOListImpl.java
@@ -27,7 +27,7 @@ import java.util.Collection;
/**
* @author Simon McDuff
*/
-public class CDOListImpl extends BasicEList<Object> implements InternalCDOList
+public class CDOListImpl extends BasicEList<Object> implements InternalCDOList.ConfigurableEquality
{
public static final CDOListFactory FACTORY = new CDOListFactory()
{
@@ -59,7 +59,7 @@ public class CDOListImpl extends BasicEList<Object> implements InternalCDOList
CDOType type = CDOModelUtil.getType(classifier);
int size = size();
- InternalCDOList list = new CDOListImpl(size, 0);
+ CDOListImpl list = new CDOListImpl(size, 0);
list.setUseEquals(useEquals());
for (int j = 0; j < size; j++)
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDOListWithElementProxiesImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDOListWithElementProxiesImpl.java
index fae2d3aea7..40577fc9de 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDOListWithElementProxiesImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/CDOListWithElementProxiesImpl.java
@@ -72,7 +72,7 @@ public class CDOListWithElementProxiesImpl extends CDOListImpl
CDOType type = CDOModelUtil.getType(classifier);
int size = size();
- InternalCDOList list = new CDOListWithElementProxiesImpl(size, 0, 0);
+ CDOListWithElementProxiesImpl list = new CDOListWithElementProxiesImpl(size, 0, 0);
list.setUseEquals(useEquals());
for (int j = 0; j < size; j++)
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataInputImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataInputImpl.java
index 7b03ab29b8..a5f5f21d71 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataInputImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/protocol/CDODataInputImpl.java
@@ -76,6 +76,7 @@ import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageInfo;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageRegistry;
import org.eclipse.emf.cdo.spi.common.model.InternalCDOPackageUnit;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDOList;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDOList.ConfigurableEquality;
import org.eclipse.emf.cdo.spi.common.revision.InternalCDORevision;
import org.eclipse.net4j.util.concurrent.IRWLockManager.LockType;
@@ -476,9 +477,9 @@ public abstract class CDODataInputImpl extends ExtendedDataInput.Delegating impl
}
InternalCDOList list = (InternalCDOList)getListFactory().createList(size, size, referenceChunk);
- if (feature instanceof EReference)
+ if (feature instanceof EReference && list instanceof ConfigurableEquality)
{
- list.setUseEquals(false);
+ ((ConfigurableEquality)list).setUseEquals(false);
}
for (int j = 0; j < referenceChunk; j++)
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/BaseCDORevision.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/BaseCDORevision.java
index 34a1e77bad..3d12c0d20c 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/BaseCDORevision.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/BaseCDORevision.java
@@ -39,6 +39,7 @@ import org.eclipse.emf.cdo.internal.common.messages.Messages;
import org.eclipse.emf.cdo.internal.common.revision.delta.CDORevisionDeltaImpl;
import org.eclipse.emf.cdo.spi.common.branch.CDOBranchUtil;
import org.eclipse.emf.cdo.spi.common.branch.InternalCDOBranch;
+import org.eclipse.emf.cdo.spi.common.revision.InternalCDOList.ConfigurableEquality;
import org.eclipse.net4j.util.om.trace.ContextTracer;
import org.eclipse.net4j.util.om.trace.PerfTracer;
@@ -355,7 +356,7 @@ public abstract class BaseCDORevision extends AbstractCDORevision
}
/**
- * @since 3.0
+ * @since 4.2
*/
public InternalCDOBranch getBranch()
{
@@ -688,9 +689,9 @@ public abstract class BaseCDORevision extends AbstractCDORevision
if (list == null && size != -1)
{
list = (InternalCDOList)CDOListFactory.DEFAULT.createList(size, 0, 0);
- if (feature instanceof EReference)
+ if (feature instanceof EReference && list instanceof ConfigurableEquality)
{
- list.setUseEquals(false);
+ ((ConfigurableEquality)list).setUseEquals(false);
}
synchronized (this)
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/DelegatingCDORevision.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/DelegatingCDORevision.java
index 1889c99b94..4a615dbbb2 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/DelegatingCDORevision.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/DelegatingCDORevision.java
@@ -73,6 +73,9 @@ public abstract class DelegatingCDORevision implements InternalCDORevision
return getDelegate().getTimeStamp();
}
+ /**
+ * @since 4.2
+ */
public InternalCDOBranch getBranch()
{
return getDelegate().getBranch();
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/InternalCDOList.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/InternalCDOList.java
index eeb0417d1e..03356b5511 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/InternalCDOList.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/InternalCDOList.java
@@ -50,12 +50,11 @@ public interface InternalCDOList extends CDOList
public void setWithoutFrozenCheck(int i, Object value);
/**
+ * @author Eike Stepper
* @since 4.2
*/
- public boolean useEquals();
-
- /**
- * @since 4.2
- */
- public void setUseEquals(boolean useEquals);
+ public interface ConfigurableEquality extends InternalCDOList
+ {
+ public void setUseEquals(boolean useEquals);
+ }
}
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/StubCDORevision.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/StubCDORevision.java
index 432714d699..03bab3056b 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/StubCDORevision.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/spi/common/revision/StubCDORevision.java
@@ -196,6 +196,9 @@ public class StubCDORevision extends AbstractCDORevision
throw new UnsupportedOperationException(getExceptionMessage());
}
+ /**
+ * @since 4.2
+ */
public InternalCDOBranch getBranch()
{
throw new UnsupportedOperationException(getExceptionMessage());
diff --git a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/WrappedHibernateList.java b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/WrappedHibernateList.java
index 9ca210065b..89ed82d496 100644
--- a/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/WrappedHibernateList.java
+++ b/plugins/org.eclipse.emf.cdo.server.hibernate/src/org/eclipse/emf/cdo/server/internal/hibernate/tuplizer/WrappedHibernateList.java
@@ -485,13 +485,4 @@ public class WrappedHibernateList implements InternalCDOList
{
getDelegate().set(i, value);
}
-
- public boolean useEquals()
- {
- return true;
- }
-
- public void setUseEquals(boolean useEquals)
- {
- }
}
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ref/ReferenceValueMap2.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ref/ReferenceValueMap2.java
index e759e47d93..e57f92dce0 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ref/ReferenceValueMap2.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ref/ReferenceValueMap2.java
@@ -32,6 +32,7 @@ import java.util.Set;
* responsible for applying proper external synchronization!
*
* @author Eike Stepper
+ * @since 3.3
*/
public abstract class ReferenceValueMap2<K, V> extends AbstractMap<K, V>
{

Back to the top