[jboss-cvs] JBossAS SVN: r83175 - projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jan 21 19:44:59 EST 2009
Author: bstansberry at jboss.com
Date: 2009-01-21 19:44:59 -0500 (Wed, 21 Jan 2009)
New Revision: 83175
Modified:
projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java
Log:
Some generics cleanup
Modified: projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java
===================================================================
--- projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java 2009-01-21 23:02:12 UTC (rev 83174)
+++ projects/cluster/ha-client/trunk/src/main/java/org/jboss/ha/framework/interfaces/FamilyClusterInfoImpl.java 2009-01-22 00:44:59 UTC (rev 83175)
@@ -42,7 +42,7 @@
// Attributes ----------------------------------------------------
private String familyName = null;
- private ArrayList targets = null;
+ private ArrayList<Object> targets = null;
private long currentViewId = 0;
private boolean isViewMembersInSyncWithViewId = false;
@@ -77,6 +77,7 @@
{
return Collections.unmodifiableList(this.targets);
}
+
public long getCurrentViewId () { return this.currentViewId; }
public int getCursor () { return this.cursor; }
public int setCursor (int cursor) { return (this.cursor = cursor);}
@@ -87,7 +88,8 @@
{
synchronized (this)
{
- ArrayList tmp = (ArrayList) targets.clone();
+ @SuppressWarnings("unchecked")
+ ArrayList<Object> tmp = (ArrayList<Object>) targets.clone();
tmp.remove (target);
this.targets = tmp;
this.isViewMembersInSyncWithViewId = false;
@@ -164,17 +166,18 @@
// Inner classes -------------------------------------------------
- private static ArrayList cloneList(List toClone)
+ @SuppressWarnings("unchecked")
+ private static ArrayList<Object> cloneList(List toClone)
{
if (toClone instanceof ArrayList)
{
synchronized (toClone)
{
- return (ArrayList) ((ArrayList) toClone).clone();
+ return (ArrayList<Object>) ((ArrayList) toClone).clone();
}
}
- ArrayList clone = new ArrayList(toClone.size());
+ ArrayList<Object> clone = new ArrayList<Object>(toClone.size());
synchronized (toClone)
{
clone.addAll(toClone);
More information about the jboss-cvs-commits
mailing list