jboner/akka — comment on commit 65a9eddbdac3423aa041898e0c73d9252499da00
File: akka-remote/src/main/scala/akka/remote/RemoteExtension.scala line 29
By patriknw:

It already does that

def extension[T <: AnyRef](key: ExtensionKey[T]): T = extensions.get(key) match {
case x: Extension[_] ⇒ x.asInstanceOf[T]
case _ ⇒ throw new IllegalArgumentException("trying to get non-registered extension " + key)
}