Mercurial > hg > RemoteEditor > REPSessionManager
changeset 437:2c00fa39dd84
minor fix
author | one |
---|---|
date | Fri, 03 Sep 2010 10:22:39 +0900 |
parents | 5e3532db2e07 |
children | 146d91b61b36 |
files | rep/channel/ChannelSimulator.java rep/channel/REPSelectionKey.java rep/channel/SelectionKeySimulator.java |
diffstat | 3 files changed, 9 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/rep/channel/ChannelSimulator.java Wed Sep 01 11:43:21 2010 +0900 +++ b/rep/channel/ChannelSimulator.java Fri Sep 03 10:22:39 2010 +0900 @@ -121,22 +121,20 @@ } - @SuppressWarnings("unchecked") - @Override + @Override public SelectionKey keyFor(Selector selector2) { - return ((SelectorSimulator) selector2).getKey(this); + return ((SelectorSimulator<?>) selector2).getKey(this); } - @SuppressWarnings("unchecked") @Override public SelectionKey keyFor(REPSelector<?> sel) { - return (SelectionKey)((SelectorSimulator) sel).getKey(this); + return (SelectionKey)((SelectorSimulator<?>) sel).getKey(this); } - @SuppressWarnings("unchecked") - @Override + @SuppressWarnings("unchecked") + @Override public REPSelectionKey<P> keyFor1(REPSelector<P> sel) { - return (REPSelectionKey<P>)((SelectorSimulator) sel).getKey(this); + return (REPSelectionKey<P>)((SelectorSimulator<P>) sel).getKey(this); } @SuppressWarnings("unchecked")
--- a/rep/channel/REPSelectionKey.java Wed Sep 01 11:43:21 2010 +0900 +++ b/rep/channel/REPSelectionKey.java Fri Sep 03 10:22:39 2010 +0900 @@ -76,7 +76,6 @@ return selector; } - @SuppressWarnings("unchecked") public REPSocketChannel<P> accept(REPPack<P> pack) throws IOException { assert(!REPServerSocketChannel.isSimulation); if (!key.isAcceptable()) throw new IOException(); @@ -85,7 +84,7 @@ SocketChannel ss = (SocketChannel)ssc.accept(); //System.err.println("Accept in SelectionKey "+ss); if (ss==null) return null; - return new REPSocketChannel(ss, pack); + return new REPSocketChannel<P>(ss, pack); }
--- a/rep/channel/SelectionKeySimulator.java Wed Sep 01 11:43:21 2010 +0900 +++ b/rep/channel/SelectionKeySimulator.java Fri Sep 03 10:22:39 2010 +0900 @@ -72,11 +72,10 @@ return scs.accept1(); } - @SuppressWarnings("unchecked") - @Override + @Override public void cancel() { canceled = true; - SelectorSimulator s = (SelectorSimulator)selector; + SelectorSimulator<?> s = (SelectorSimulator<?>)selector; s.deregister(channel); }