Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2012-09-14 10:37:40 +0000
committerEike Stepper2012-09-14 10:37:40 +0000
commit3d4c0de327cf50fad02237a0f14cef3f61b01ed4 (patch)
treefb84106be2a9e942c588cca4a2f1bb42a91f9f3a /plugins
parentc2f161e3e9119d80d47085eace302aecbc7949bd (diff)
downloadcdo-3d4c0de327cf50fad02237a0f14cef3f61b01ed4.tar.gz
cdo-3d4c0de327cf50fad02237a0f14cef3f61b01ed4.tar.xz
cdo-3d4c0de327cf50fad02237a0f14cef3f61b01ed4.zip
Better readability
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDORevisionDeltaImpl.java3
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java10
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java6
4 files changed, 15 insertions, 12 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDORevisionDeltaImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDORevisionDeltaImpl.java
index a5265ea4b0..5126af8a66 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDORevisionDeltaImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDORevisionDeltaImpl.java
@@ -309,7 +309,8 @@ public class CDORevisionDeltaImpl implements InternalCDORevisionDelta
CDORevisionData originData = originRevision.data();
CDORevisionData dirtyData = dirtyRevision.data();
- for (final EStructuralFeature feature : CDOModelUtil.getAllPersistentFeatures(eClass))
+ EStructuralFeature[] allPersistentFeatures = CDOModelUtil.getAllPersistentFeatures(eClass);
+ for (final EStructuralFeature feature : allPersistentFeatures)
{
if (feature.isMany())
{
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java
index fb3663cd5a..99f7260037 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/AbstractHorizontalClassMapping.java
@@ -144,17 +144,17 @@ public abstract class AbstractHorizontalClassMapping implements IClassMapping
private void initFeatures()
{
- EStructuralFeature[] features = CDOModelUtil.getAllPersistentFeatures(eClass);
+ EStructuralFeature[] allPersistentFeatures = CDOModelUtil.getAllPersistentFeatures(eClass);
- if (features == null)
+ if (allPersistentFeatures == null)
{
valueMappings = Collections.emptyList();
listMappings = Collections.emptyList();
}
else
{
- valueMappings = createValueMappings(features);
- listMappings = createListMappings(features);
+ valueMappings = createValueMappings(allPersistentFeatures);
+ listMappings = createListMappings(allPersistentFeatures);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
index 1d38c9843c..b44f6b5b0b 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
@@ -571,10 +571,10 @@ public class Repository extends Container<Object> implements InternalRepository
protected void ensureChunks(InternalCDORevision revision, int referenceChunk, IStoreAccessor accessor)
{
EClass eClass = revision.getEClass();
- EStructuralFeature[] features = CDOModelUtil.getAllPersistentFeatures(eClass);
- for (int i = 0; i < features.length; i++)
+ EStructuralFeature[] allPersistentFeatures = CDOModelUtil.getAllPersistentFeatures(eClass);
+ for (int i = 0; i < allPersistentFeatures.length; i++)
{
- EStructuralFeature feature = features[i];
+ EStructuralFeature feature = allPersistentFeatures[i];
if (feature.isMany())
{
MoveableList<Object> list = revision.getList(feature);
@@ -588,7 +588,9 @@ public class Repository extends Container<Object> implements InternalRepository
{
if (!revision.isUnchunked())
{
- for (EStructuralFeature feature : CDOModelUtil.getAllPersistentFeatures(revision.getEClass()))
+ EClass eClass = revision.getEClass();
+ EStructuralFeature[] allPersistentFeatures = CDOModelUtil.getAllPersistentFeatures(eClass);
+ for (EStructuralFeature feature : allPersistentFeatures)
{
if (feature.isMany())
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java
index 4094de52eb..5ea3f8f7e8 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Session.java
@@ -323,10 +323,10 @@ public class Session extends Container<IView> implements InternalSession
{
InternalCDORevisionManager revisionManager = getManager().getRepository().getRevisionManager();
EClass eClass = revision.getEClass();
- EStructuralFeature[] features = CDOModelUtil.getAllPersistentFeatures(eClass);
- for (int i = 0; i < features.length; i++)
+ EStructuralFeature[] allPersistentFeatures = CDOModelUtil.getAllPersistentFeatures(eClass);
+ for (int i = 0; i < allPersistentFeatures.length; i++)
{
- EStructuralFeature feature = features[i];
+ EStructuralFeature feature = allPersistentFeatures[i];
// TODO Clarify feature maps
if (feature instanceof EReference && !feature.isMany() && ((EReference)feature).isContainment())
{

Back to the top