package com.ikasoa.core.nifty;

import org.jboss.netty.channel.Channel;

public class ConnectionContexts {
	public static ConnectionContext getContext(Channel channel) {
		ConnectionContext context = (ConnectionContext) channel.getPipeline().getContext(ConnectionContextHandler.class)
				.getAttachment();
		Preconditions.checkState(context != null, "Context not yet set on channel {}", channel);
		return context;
	}
}

@@ -306,32 +306,10 @@
 ;%0A%09%09
-Preconditions.checkState
+if
 (con
@@ -317,17 +317,52 @@
 ext 
-!
+=
 = null
-, 
+)%0A%09%09%09throw new IllegalStateException(
 %22Con
@@ -393,20 +393,19 @@
 nel 
-%7B%7D%22,
+%22 +
  channel
 );%0A%09
@@ -400,16 +400,27 @@
  channel
+.toString()
 );%0A%09%09ret

Update ConnectionContexts.java