Remove unneeded casts.

git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4923 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Dave Hoover
2008-01-17 01:25:52 +00:00
parent 346e4ee781
commit 2ce35db583
3 changed files with 4 additions and 6 deletions
@@ -159,8 +159,7 @@ public class DSetEditor extends JPanel
{ {
if (event.getName().equals(_setName)) { if (event.getName().equals(_setName)) {
DSet.Entry entry = event.getEntry(); DSet.Entry entry = event.getEntry();
@SuppressWarnings("unchecked") Comparable<Object> key = @SuppressWarnings("unchecked") Comparable<Object> key = entry.getKey();
(Comparable<Object>)entry.getKey();
int index = _keys.insertSorted(key); int index = _keys.insertSorted(key);
_table.insertDatum(entry, index); _table.insertDatum(entry, index);
} }
@@ -210,8 +209,7 @@ public class DSetEditor extends JPanel
DSet.Entry[] entries = new DSet.Entry[_set.size()]; DSet.Entry[] entries = new DSet.Entry[_set.size()];
_set.toArray(entries); _set.toArray(entries);
for (int ii = 0; ii < entries.length; ii++) { for (int ii = 0; ii < entries.length; ii++) {
@SuppressWarnings("unchecked") Comparable<Object> key = @SuppressWarnings("unchecked") Comparable<Object> key = entries[ii].getKey();
(Comparable<Object>)entries[ii].getKey();
_keys.insertSorted(key); _keys.insertSorted(key);
} }
_table.setData(entries); // this works because DSet itself is sorted _table.setData(entries); // this works because DSet itself is sorted
@@ -290,7 +290,7 @@ public class Client
} }
int scount = _bstrap.services.size(); int scount = _bstrap.services.size();
for (int ii = 0; ii < scount; ii++) { for (int ii = 0; ii < scount; ii++) {
InvocationService service = (InvocationService)_bstrap.services.get(ii); InvocationService service = _bstrap.services.get(ii);
if (sclass.isInstance(service)) { if (sclass.isInstance(service)) {
return service; return service;
} }
@@ -660,7 +660,7 @@ public class ConnectionManager extends LoopingThread
// create a new authing connection object to manage the authentication of this client // create a new authing connection object to manage the authentication of this client
// connection and register it with our selection set // connection and register it with our selection set
SelectableChannel selchan = (SelectableChannel)channel; SelectableChannel selchan = channel;
selchan.configureBlocking(false); selchan.configureBlocking(false);
SelectionKey selkey = selchan.register(_selector, SelectionKey.OP_READ); SelectionKey selkey = selchan.register(_selector, SelectionKey.OP_READ);
_handlers.put(selkey, new AuthingConnection(this, selkey, channel)); _handlers.put(selkey, new AuthingConnection(this, selkey, channel));