Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.emf.cdo.server')
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ClassInfoImpl.java12
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageInfoImpl.java4
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java18
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java22
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java10
5 files changed, 33 insertions, 33 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ClassInfoImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ClassInfoImpl.java
index 1d2150bf64..dbe8ad1c22 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ClassInfoImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/ClassInfoImpl.java
@@ -32,7 +32,7 @@ public class ClassInfoImpl implements ClassInfo
protected PackageInfo packageInfo;
- protected List attributeInfos = new ArrayList();
+ protected List<AttributeInfo> attributeInfos = new ArrayList<AttributeInfo>();
private ClassInfo cachedParent;
@@ -85,9 +85,9 @@ public class ClassInfoImpl implements ClassInfo
public AttributeInfo getAttributeInfo(int feature)
{
- for (Iterator iter = attributeInfos.iterator(); iter.hasNext();)
+ for (Iterator<AttributeInfo> iter = attributeInfos.iterator(); iter.hasNext();)
{
- AttributeInfo attributeInfo = (AttributeInfo) iter.next();
+ AttributeInfo attributeInfo = iter.next();
if (attributeInfo.getFeatureID() == feature)
{
@@ -106,7 +106,7 @@ public class ClassInfoImpl implements ClassInfo
public AttributeInfo[] getAttributeInfos()
{
- return (AttributeInfo[]) attributeInfos.toArray(new AttributeInfo[attributeInfos.size()]);
+ return attributeInfos.toArray(new AttributeInfo[attributeInfos.size()]);
}
public ClassInfo getParent()
@@ -126,9 +126,9 @@ public class ClassInfoImpl implements ClassInfo
StringBuffer buffer = new StringBuffer();
boolean first = true;
- for (Iterator iter = attributeInfos.iterator(); iter.hasNext();)
+ for (Iterator<AttributeInfo> iter = attributeInfos.iterator(); iter.hasNext();)
{
- AttributeInfo attributeInfo = (AttributeInfo) iter.next();
+ AttributeInfo attributeInfo = iter.next();
if (first)
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageInfoImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageInfoImpl.java
index 94ab900348..cae10db1d4 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageInfoImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageInfoImpl.java
@@ -27,7 +27,7 @@ public class PackageInfoImpl implements PackageInfo
protected PackageManager packageManager;
- protected List classes = new ArrayList();
+ protected List<ClassInfo> classes = new ArrayList<ClassInfo>();
public PackageInfoImpl(int pid, String name, PackageManager packageManager)
{
@@ -61,6 +61,6 @@ public class PackageInfoImpl implements PackageInfo
public ClassInfo[] getClasses()
{
- return (ClassInfo[]) classes.toArray(new ClassInfo[classes.size()]);
+ return classes.toArray(new ClassInfo[classes.size()]);
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java
index ad26629569..ea204d9694 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/impl/PackageManagerImpl.java
@@ -27,17 +27,17 @@ import java.util.Map;
public class PackageManagerImpl extends ServiceImpl implements PackageManager
{
- protected Map cidToClassInfoMap = new HashMap(2111);
+ protected Map<Integer, ClassInfo> cidToClassInfoMap = new HashMap<Integer, ClassInfo>(2111);
- protected Map nameToClassInfoMap = new HashMap(2111);
+ protected Map<String, ClassInfo> nameToClassInfoMap = new HashMap<String, ClassInfo>(2111);
- protected Map packages = new HashMap();
+ protected Map<String, PackageInfo> packages = new HashMap<String, PackageInfo>();
- protected List listeners = new ArrayList();
+ protected List<PackageListener> listeners = new ArrayList<PackageListener>();
public PackageInfo getPackageInfo(String name)
{
- return (PackageInfo) packages.get(name);
+ return packages.get(name);
}
public PackageInfo addPackage(int pid, String name)
@@ -66,19 +66,19 @@ public class PackageManagerImpl extends ServiceImpl implements PackageManager
public ClassInfo getClassInfo(int cid)
{
- return (ClassInfo) cidToClassInfoMap.get(new Integer(cid));
+ return cidToClassInfoMap.get(new Integer(cid));
}
public ClassInfo getClassInfo(String name)
{
- return (ClassInfo) nameToClassInfoMap.get(name);
+ return nameToClassInfoMap.get(name);
}
protected void notifyPackageListeners()
{
- for (Iterator iter = listeners.iterator(); iter.hasNext();)
+ for (Iterator<PackageListener> iter = listeners.iterator(); iter.hasNext();)
{
- PackageListener listener = (PackageListener) iter.next();
+ PackageListener listener = iter.next();
listener.notifyAddedPackage();
}
}
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java
index f562b16ef5..da53b2867e 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/CommitTransactionIndication.java
@@ -44,19 +44,19 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
{
public static final int CAPACITY_tempIdtoPersistentIdMap = 499;
- private Map tempOIDs = new HashMap(CAPACITY_tempIdtoPersistentIdMap);
+ private Map<Long, Long> tempOIDs = new HashMap<Long, Long>(CAPACITY_tempIdtoPersistentIdMap);
- private List changedObjectIds = new ArrayList();
+ private List<Long> changedObjectIds = new ArrayList<Long>();
- private Map changedObjectOIDOCA = new HashMap();
+ private Map<Long, Integer> changedObjectOIDOCA = new HashMap<Long, Integer>();
- private List oidList = new ArrayList();
+ private List<Long> oidList = new ArrayList<Long>();
private boolean optimisticControlException = false;
private Mapper mapper;
- private List<ResourceChangeInfo> newResources = new ArrayList();
+ private List<ResourceChangeInfo> newResources = new ArrayList<ResourceChangeInfo>();
public short getSignalId()
{
@@ -104,20 +104,20 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
transmitInt(oidList.size());
- for (Iterator iter = oidList.iterator(); iter.hasNext();)
+ for (Iterator<Long> iter = oidList.iterator(); iter.hasNext();)
{
- Long id = (Long) iter.next();
+ Long id = iter.next();
transmitLong(id.longValue());
}
transmitInt(changedObjectIds.size());
- for (Iterator iter = changedObjectIds.iterator(); iter.hasNext();)
+ for (Iterator<Long> iter = changedObjectIds.iterator(); iter.hasNext();)
{
- Long id = (Long) iter.next();
+ Long id = iter.next();
transmitLong(id.longValue());
- Integer oca = (Integer) changedObjectOIDOCA.get(id);
+ Integer oca = changedObjectOIDOCA.get(id);
transmitInt(oca.intValue());
}
}
@@ -247,7 +247,7 @@ public class CommitTransactionIndication extends AbstractIndicationWithResponse
*/
private long resolveTempOID(long tempOID)
{
- Long sourceVal = (Long) tempOIDs.get(new Long(tempOID));
+ Long sourceVal = tempOIDs.get(new Long(tempOID));
if (sourceVal == null)
{
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java
index 97eb62086d..20210fd373 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/server/protocol/DescribePackageIndication.java
@@ -27,7 +27,7 @@ import java.util.List;
public class DescribePackageIndication extends AbstractIndicationWithResponse
{
- private List infos;
+ private List<ClassInfo> infos;
public short getSignalId()
{
@@ -51,9 +51,9 @@ public class DescribePackageIndication extends AbstractIndicationWithResponse
{
transmitInt(infos.size());
- for (Iterator iter = infos.iterator(); iter.hasNext();)
+ for (Iterator<ClassInfo> iter = infos.iterator(); iter.hasNext();)
{
- ClassInfo classInfo = (ClassInfo) iter.next();
+ ClassInfo classInfo = iter.next();
if (isDebugEnabled())
debug("Responding class " + classInfo.getName() + " = " + classInfo.getCID());
@@ -62,9 +62,9 @@ public class DescribePackageIndication extends AbstractIndicationWithResponse
}
}
- private List receiveClasses(PackageInfo packageInfo)
+ private List<ClassInfo> receiveClasses(PackageInfo packageInfo)
{
- List result = new ArrayList();
+ List<ClassInfo> result = new ArrayList<ClassInfo>();
int count = receiveInt();
for (int i = 0; i < count; i++)

Back to the top