Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2013-03-08 03:19:19 -0500
committerEike Stepper2013-03-08 03:19:19 -0500
commitc811a8460f00883d9f81b8429e1b3f908f73493a (patch)
tree8d75d63cd93bdb59d188f9c86f6673463c5a858a
parentef293640557a8709debf62f11e2fad7841af984a (diff)
downloadcdo-c811a8460f00883d9f81b8429e1b3f908f73493a.tar.gz
cdo-c811a8460f00883d9f81b8429e1b3f908f73493a.tar.xz
cdo-c811a8460f00883d9f81b8429e1b3f908f73493a.zip
Use Pair.create()
-rw-r--r--plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDOListFeatureDeltaImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.efs/src/org/eclipse/emf/cdo/internal/efs/CDOFileSystem.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CreateBranchRequest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMappingRegistry.java7
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/BranchingListTableMappingWithRanges.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalNonAuditClassMapping.java6
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OPackageUnit.java5
-rw-r--r--plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/schema/ObjyBranchManager.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/Net4jDBTest.java2
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/verifier/DBStoreVerifier.java4
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java7
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStateMachine.java2
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewProviderRegistryImpl.java6
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/DefaultCDOMerger.java2
-rw-r--r--plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java2
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ReflectUtil.java2
20 files changed, 32 insertions, 35 deletions
diff --git a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDOListFeatureDeltaImpl.java b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDOListFeatureDeltaImpl.java
index 538e56d422..16430ac5df 100644
--- a/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDOListFeatureDeltaImpl.java
+++ b/plugins/org.eclipse.emf.cdo.common/src/org/eclipse/emf/cdo/internal/common/revision/delta/CDOListFeatureDeltaImpl.java
@@ -149,13 +149,13 @@ public class CDOListFeatureDeltaImpl extends CDOFeatureDeltaImpl implements CDOL
/**
* Returns the number of indices as the first element of the array.
- *
+ *
* @return never <code>null</code>.
*/
public Pair<ListTargetAdding[], int[]> reconstructAddedIndices()
{
reconstructAddedIndicesWithNoCopy();
- return new Pair<ListTargetAdding[], int[]>(copyOf(cachedSources, cachedSources.length, cachedSources.getClass()),
+ return Pair.create(copyOf(cachedSources, cachedSources.length, cachedSources.getClass()),
copyOf(cachedIndices, cachedIndices.length));
}
diff --git a/plugins/org.eclipse.emf.cdo.efs/src/org/eclipse/emf/cdo/internal/efs/CDOFileSystem.java b/plugins/org.eclipse.emf.cdo.efs/src/org/eclipse/emf/cdo/internal/efs/CDOFileSystem.java
index b5c76f2980..8bf66f9585 100644
--- a/plugins/org.eclipse.emf.cdo.efs/src/org/eclipse/emf/cdo/internal/efs/CDOFileSystem.java
+++ b/plugins/org.eclipse.emf.cdo.efs/src/org/eclipse/emf/cdo/internal/efs/CDOFileSystem.java
@@ -147,7 +147,7 @@ public abstract class CDOFileSystem extends FileSystem
protected CDOSession getSession(String authority, String repositoryName, IProgressMonitor monitor)
{
- Pair<String, String> sessionKey = new Pair<String, String>(authority, repositoryName);
+ Pair<String, String> sessionKey = Pair.create(authority, repositoryName);
CDOSession session = sessions.get(sessionKey);
if (session == null)
{
diff --git a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CreateBranchRequest.java b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CreateBranchRequest.java
index a7a859c18c..e500a0a20e 100644
--- a/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CreateBranchRequest.java
+++ b/plugins/org.eclipse.emf.cdo.net4j/src/org/eclipse/emf/cdo/internal/net4j/protocol/CreateBranchRequest.java
@@ -47,6 +47,6 @@ public class CreateBranchRequest extends CDOClientRequest<Pair<Integer, Long>>
{
branchID = in.readInt();
long baseTimeStamp = in.readLong();
- return new Pair<Integer, Long>(branchID, baseTimeStamp);
+ return Pair.create(branchID, baseTimeStamp);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
index d679abdec8..c0d2dfc22c 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/DBStoreAccessor.java
@@ -858,7 +858,7 @@ public class DBStoreAccessor extends StoreAccessor implements IDBStoreAccessor,
DBUtil.update(stmt, true);
getConnection().commit();
- return new Pair<Integer, Long>(branchID, branchInfo.getBaseTimeStamp());
+ return Pair.create(branchID, branchInfo.getBaseTimeStamp());
}
catch (SQLException ex)
{
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMappingRegistry.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMappingRegistry.java
index e828a11f1e..3c8f26227e 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMappingRegistry.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/TypeMappingRegistry.java
@@ -202,7 +202,7 @@ public class TypeMappingRegistry implements ITypeMapping.Registry, ITypeMapping.
EClassifier eClassifier = descriptor.getEClassifier();
DBType dbType = descriptor.getDBType();
- Pair<EClassifier, DBType> sourceTargetPair = new Pair<EClassifier, DBType>(eClassifier, dbType);
+ Pair<EClassifier, DBType> sourceTargetPair = Pair.create(eClassifier, dbType);
// currently we do not support more than one typeMapping per source-target type pair
if (typeMappingByTypes.containsKey(sourceTargetPair))
@@ -345,13 +345,12 @@ public class TypeMappingRegistry implements ITypeMapping.Registry, ITypeMapping.
private ITypeMapping.Descriptor getMappingByType(EStructuralFeature feature, DBType dbType)
{
// First try: lookup specific mapping for the immediate type.
- ITypeMapping.Descriptor descriptor = typeMappingByTypes.get(new Pair<EClassifier, DBType>(feature.getEType(),
- dbType));
+ ITypeMapping.Descriptor descriptor = typeMappingByTypes.get(Pair.create(feature.getEType(), dbType));
if (descriptor == null)
{
// Second try: lookup general mapping
- descriptor = typeMappingByTypes.get(new Pair<EClassifier, DBType>(getEType(feature), dbType));
+ descriptor = typeMappingByTypes.get(Pair.create(getEType(feature), dbType));
if (descriptor == null)
{
// Lookup failed. Give up
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/BranchingListTableMappingWithRanges.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/BranchingListTableMappingWithRanges.java
index eee03722d8..3e7f4a3ec6 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/BranchingListTableMappingWithRanges.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/BranchingListTableMappingWithRanges.java
@@ -348,7 +348,7 @@ public class BranchingListTableMappingWithRanges extends BasicAbstractListTableM
{
toReadFromBase = new ArrayList<Pair<Integer, Integer>>();
}
- toReadFromBase.add(new Pair<Integer, Integer>(currentIndex, index));
+ toReadFromBase.add(Pair.create(currentIndex, index));
if (TRACER.isEnabled())
{
@@ -375,7 +375,7 @@ public class BranchingListTableMappingWithRanges extends BasicAbstractListTableM
{
toReadFromBase = new ArrayList<Pair<Integer, Integer>>();
}
- toReadFromBase.add(new Pair<Integer, Integer>(currentIndex, currentIndex + valuesToRead));
+ toReadFromBase.add(Pair.create(currentIndex, currentIndex + valuesToRead));
}
}
catch (SQLException ex)
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalNonAuditClassMapping.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalNonAuditClassMapping.java
index add4fcd5f8..4222481aa3 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalNonAuditClassMapping.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/mapping/horizontal/HorizontalNonAuditClassMapping.java
@@ -590,7 +590,7 @@ public class HorizontalNonAuditClassMapping extends AbstractHorizontalClassMappi
throw new IllegalArgumentException("AttributeMapping for " + delta.getFeature() + " is null!"); //$NON-NLS-1$ //$NON-NLS-2$
}
- attributeChanges.add(new Pair<ITypeMapping, Object>(am, delta.getValue()));
+ attributeChanges.add(Pair.create(am, delta.getValue()));
}
public void visit(CDOUnsetFeatureDelta delta)
@@ -598,7 +598,7 @@ public class HorizontalNonAuditClassMapping extends AbstractHorizontalClassMappi
// TODO: correct this when DBStore implements unsettable features
// see Bugs 259868 and 263010
ITypeMapping tm = getValueMapping(delta.getFeature());
- attributeChanges.add(new Pair<ITypeMapping, Object>(tm, null));
+ attributeChanges.add(Pair.create(tm, null));
}
public void visit(CDOListFeatureDelta delta)
@@ -614,7 +614,7 @@ public class HorizontalNonAuditClassMapping extends AbstractHorizontalClassMappi
if (oldSize != newSize)
{
- listSizeChanges.add(new Pair<EStructuralFeature, Integer>(feature, newSize));
+ listSizeChanges.add(Pair.create(feature, newSize));
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OPackageUnit.java b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OPackageUnit.java
index 13ad6137eb..101096d243 100644
--- a/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OPackageUnit.java
+++ b/plugins/org.eclipse.emf.cdo.server.db4o/src/org/eclipse/emf/cdo/server/internal/db4o/DB4OPackageUnit.java
@@ -159,11 +159,10 @@ public class DB4OPackageUnit
List<Pair<String, String>> infos = new ArrayList<Pair<String, String>>();
for (InternalCDOPackageInfo info : packageInfos)
{
- Pair<String, String> pair = new Pair<String, String>();
- pair.setElement1(info.getParentURI());
- pair.setElement2(info.getPackageURI());
+ Pair<String, String> pair = Pair.create(info.getParentURI(), info.getPackageURI());
infos.add(pair);
}
+
return infos;
}
diff --git a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java
index ff6b640214..5706a3d30f 100644
--- a/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java
+++ b/plugins/org.eclipse.emf.cdo.server.lissome/src/org/eclipse/emf/cdo/server/internal/lissome/LissomeStoreReader.java
@@ -421,7 +421,7 @@ public class LissomeStoreReader extends StoreAccessorBase implements ILissomeSto
Optimizer optimizer = getStore().getOptimizer();
optimizer.addTask(task);
- return new Pair<Integer, Long>(branchID, branchInfo.getBaseTimeStamp());
+ return Pair.create(branchID, branchInfo.getBaseTimeStamp());
}
public LockArea createLockArea(String userID, CDOBranchPoint branchPoint, boolean readOnly,
diff --git a/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/schema/ObjyBranchManager.java b/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/schema/ObjyBranchManager.java
index fee6ed3b8d..dbe6c25d98 100644
--- a/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/schema/ObjyBranchManager.java
+++ b/plugins/org.eclipse.emf.cdo.server.objectivity/src/org/eclipse/emf/cdo/server/internal/objectivity/schema/ObjyBranchManager.java
@@ -118,7 +118,7 @@ public class ObjyBranchManager extends ooObj
// objyBranch.addSubBranch(newObjyBranch);
// }
- return new Pair<Integer, Long>(branchId, branchInfo.getBaseTimeStamp());
+ return Pair.create(branchId, branchInfo.getBaseTimeStamp());
}
public ObjyBranch getBranch(int branchId)
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java
index 63ad367e6d..782ecc5459 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/mem/MEMStore.java
@@ -219,7 +219,7 @@ public class MEMStore extends LongIDStore implements IMEMStore, BranchLoader, Du
}
branchInfos.put(branchID, branchInfo);
- return new Pair<Integer, Long>(branchID, branchInfo.getBaseTimeStamp());
+ return Pair.create(branchID, branchInfo.getBaseTimeStamp());
}
public synchronized BranchInfo loadBranch(int branchID)
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/Net4jDBTest.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/Net4jDBTest.java
index 634e0a4947..2d88867838 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/Net4jDBTest.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/Net4jDBTest.java
@@ -337,7 +337,7 @@ public class Net4jDBTest extends AbstractCDOTest
private void registerColumn(DBType type, Object value)
{
- Pair<DBType, Object> column = new Pair<DBType, Object>(type, value);
+ Pair<DBType, Object> column = Pair.create(type, value);
columns.add(column);
}
diff --git a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/verifier/DBStoreVerifier.java b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/verifier/DBStoreVerifier.java
index 6501c8f4f5..95e34ef7e9 100644
--- a/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/verifier/DBStoreVerifier.java
+++ b/plugins/org.eclipse.emf.cdo.tests.db/src/org/eclipse/emf/cdo/tests/db/verifier/DBStoreVerifier.java
@@ -351,7 +351,7 @@ public abstract class DBStoreVerifier
{
while (resultSet.next())
{
- idVersions.add(new Pair<Long, Integer>(resultSet.getLong(1), resultSet.getInt(2)));
+ idVersions.add(Pair.create(resultSet.getLong(1), resultSet.getInt(2)));
}
}
finally
@@ -499,7 +499,7 @@ public abstract class DBStoreVerifier
{
while (resultSet.next())
{
- idVersions.add(new Pair<Long, Integer>(resultSet.getLong(1), resultSet.getInt(2)));
+ idVersions.add(Pair.create(resultSet.getLong(1), resultSet.getInt(2)));
}
}
finally
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
index d69cba7b33..cbf964a97f 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/transaction/CDOTransactionImpl.java
@@ -2373,7 +2373,7 @@ public class CDOTransactionImpl extends CDOViewImpl implements InternalCDOTransa
}
Setting setting = internalReferencer.eSetting(reference);
- objectsToBeRemoved.add(new Pair<Setting, EObject>(setting, referencedObject));
+ objectsToBeRemoved.add(Pair.create(setting, referencedObject));
}
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
index 2f544e1a38..30dea36fdc 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/AbstractCDOView.java
@@ -1404,8 +1404,7 @@ public abstract class AbstractCDOView extends CDOCommitHistoryProviderImpl<CDOOb
CDOObject changedObject = objects.get(key.getID());
if (changedObject != null)
{
- Pair<CDORevision, CDORevisionDelta> oldInfo = new Pair<CDORevision, CDORevisionDelta>(
- changedObject.cdoRevision(), delta);
+ Pair<CDORevision, CDORevisionDelta> oldInfo = Pair.create(changedObject.cdoRevision(), delta);
// if (!isLocked(changedObject))
{
CDOStateMachine.INSTANCE.invalidate((InternalCDOObject)changedObject, key);
@@ -1429,8 +1428,8 @@ public abstract class AbstractCDOView extends CDOCommitHistoryProviderImpl<CDOOb
InternalCDOObject detachedObject = removeObject(key.getID());
if (detachedObject != null)
{
- Pair<CDORevision, CDORevisionDelta> oldInfo = new Pair<CDORevision, CDORevisionDelta>(
- detachedObject.cdoRevision(), CDORevisionDelta.DETACHED);
+ Pair<CDORevision, CDORevisionDelta> oldInfo = Pair.create((CDORevision)detachedObject.cdoRevision(),
+ CDORevisionDelta.DETACHED);
// if (!isLocked(detachedObject))
{
CDOStateMachine.INSTANCE.detachRemote(detachedObject);
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStateMachine.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStateMachine.java
index 1589902ccc..b91969d5c8 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStateMachine.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOStateMachine.java
@@ -201,7 +201,7 @@ public final class CDOStateMachine extends FiniteStateMachine<CDOState, CDOEvent
synchronized (transaction)
{
List<InternalCDOObject> contents = new ArrayList<InternalCDOObject>();
- prepare(object, new Pair<InternalCDOTransaction, List<InternalCDOObject>>(transaction, contents));
+ prepare(object, Pair.create(transaction, contents));
attachOrReattach(object, transaction);
for (InternalCDOObject content : contents)
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewProviderRegistryImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewProviderRegistryImpl.java
index 38580f4f9e..e843f72623 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewProviderRegistryImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/view/CDOViewProviderRegistryImpl.java
@@ -45,7 +45,7 @@ import java.util.List;
/**
* When instanced in Eclipse, it's populated with contributions from the viewProvider Extension Point. A default
* CDOViewProvider implementation is registered, regardless of the execution environment.
- *
+ *
* @author Victor Roldan Betancort
* @since 2.0
* @see CDOViewProvider
@@ -90,7 +90,7 @@ public class CDOViewProviderRegistryImpl extends Container<CDOViewProvider> impl
CDOView view = viewSet.resolveView(uuid);
if (view != null)
{
- return new Pair<CDOView, CDOViewProvider>(view, null);
+ return Pair.create(view, null);
}
}
catch (Exception ignore)
@@ -104,7 +104,7 @@ public class CDOViewProviderRegistryImpl extends Container<CDOViewProvider> impl
CDOView view = viewProvider.getView(uri, resourceSet);
if (view != null)
{
- return new Pair<CDOView, CDOViewProvider>(view, viewProvider);
+ return Pair.create(view, viewProvider);
}
}
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/DefaultCDOMerger.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/DefaultCDOMerger.java
index 039d9b423d..71421e9a99 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/DefaultCDOMerger.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/spi/cdo/DefaultCDOMerger.java
@@ -490,7 +490,7 @@ public class DefaultCDOMerger implements CDOMerger
if (conflict != null)
{
- return new Pair<InternalCDORevisionDelta, ChangedInSourceAndTargetConflict>(result, conflict);
+ return Pair.create(result, conflict);
}
return result;
diff --git a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java
index 38ad6e9c18..7494c2aed3 100644
--- a/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java
+++ b/plugins/org.eclipse.net4j.util.ui/src/org/eclipse/net4j/util/internal/ui/views/Net4jIntrospectorView.java
@@ -726,7 +726,7 @@ public class Net4jIntrospectorView extends ViewPart implements IPartListener, IS
Pair<Integer, Object>[] result = new Pair[array.length];
for (int i = 0; i < array.length; i++)
{
- result[i] = new Pair<Integer, Object>(i, array[i]);
+ result[i] = Pair.create(i, array[i]);
}
return result;
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ReflectUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ReflectUtil.java
index 0bb6ac07d1..c9aef9ef81 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ReflectUtil.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/ReflectUtil.java
@@ -368,7 +368,7 @@ public final class ReflectUtil
for (Field field : fields)
{
Object value = getValue(field, object);
- result[i++] = new Pair<Field, Object>(field, value);
+ result[i++] = Pair.create(field, value);
}
return result;

Back to the top