Some type safety, redundant cast removal, and other code hygiene.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4879 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2007-11-24 19:40:19 +00:00
parent 6eb2c79b19
commit 63db77667a
9 changed files with 22 additions and 34 deletions
@@ -66,7 +66,7 @@ public class StreamableHashMap<K,V> extends HashMap<K,V>
int ecount = size();
out.writeInt(ecount);
for (Iterator<Map.Entry<K,V>> iter = entrySet().iterator(); iter.hasNext(); ) {
Map.Entry<K,V> entry = (Map.Entry<K,V>) iter.next();
Map.Entry<K,V> entry = iter.next();
out.writeObject(entry.getKey());
out.writeObject(entry.getValue());
}
@@ -59,7 +59,7 @@ public class TrackedObject
{
Class clazz = getClass();
synchronized (_map) {
int[] count = (int[])_map.get(clazz);
int[] count = _map.get(clazz);
if (count == null) {
_map.put(clazz, count = new int[1]);
}
@@ -73,7 +73,7 @@ public class TrackedObject
{
Class clazz = getClass();
synchronized (_map) {
int[] count = (int[])_map.get(clazz);
int[] count = _map.get(clazz);
if (count != null) {
count[0]--;
} else {