Checked against examples & submitted PR #1995 
 That one can be closed, #1995 is pulled :)
 @ifesdjeen true.. thanks!

The Javadoc example of IdleStateHandler is incorrect
The second param in userEventTriggered() should be converted to IdleStateEvent instead of IdleState.

The following two lines should be changed:
         if (evt instanceof IdleState} {
             IdleState e = (IdleState) evt;

handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java
handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java
diff --git a/handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java b/handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java
index 19b8b9c8d90..c69aa7b38e5 100644
--- a/handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java
+++ b/handler/src/main/java/io/netty/handler/timeout/IdleStateHandler.java
@@ -74,8 +74,8 @@
  * public class MyHandler extends {@link ChannelDuplexHandler} {
  *     {@code @Override}
  *     public void userEventTriggered({@link ChannelHandlerContext} ctx, {@link Object} evt) throws {@link Exception} {
- *         if (evt instanceof {@link IdleState}} {
- *             {@link IdleState} e = ({@link IdleState}) evt;
+ *         if (evt instanceof {@link IdleStateEvent}} {
+ *             {@link IdleStateEvent} e = ({@link IdleStateEvent}) evt;
  *             if (e.state() == {@link IdleState}.READER_IDLE) {
  *                 ctx.close();
  *             } else if (e.state() == {@link IdleState}.WRITER_IDLE) {
