changeset 197:ec69099f8270

minor fix
author one
date Wed, 01 Sep 2010 11:57:49 +0900
parents 4c6f7c6a2180
children 1f63cec3755c
files src/rep/channel/ServerChannelSimulator.java
diffstat 1 files changed, 11 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/rep/channel/ServerChannelSimulator.java	Wed Dec 31 18:20:22 2008 +0900
+++ b/src/rep/channel/ServerChannelSimulator.java	Wed Sep 01 11:57:49 2010 +0900
@@ -45,23 +45,25 @@
 		return channel;
 	}
 	
-	protected boolean enQ(ChannelSimulator<P> ch){
+		protected boolean enQ(ChannelSimulator<?> ch){
 		// Don't lock a selector from a locked channel, the selector may
 		// use channel.isAble() which locks the channel.
+		@SuppressWarnings("unchecked")
+		ChannelSimulator<P>ch1 = (ChannelSimulator<P>)ch;
 		synchronized(this) {
-			acceptQ.offer(ch);
+			acceptQ.offer(ch1);
 			notify();
 		}
 		selector.wakeup();
 		return true;
 	}
-
-	@SuppressWarnings("unchecked")
-	public void enQ(ChannelSimulator<?> hserver) {
-		// NetworkSimulator doesn't know P
-		ChannelSimulator<P>ch = (ChannelSimulator<P>) hserver;
-		enQ(ch);
-	}
+//
+//	@SuppressWarnings("unchecked")
+//	public void enQ(ChannelSimulator<?> hserver) {
+//		// NetworkSimulator doesn't know P
+//		ChannelSimulator<P>ch = (ChannelSimulator<P>) hserver;
+//		enQ(ch);
+//	}
 	
 	public ServerSocket socket() {
 		try {