Minimal setup to reproduce the problem. Note that that with Java 1.7 this works fine.
$ java -version
java version "1.8.0_40-ea"
Java(TM) SE Runtime Environment (build 1.8.0_40-ea-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.40-b18, mixed mode)