Intellij fixes for Java 7
Merge pull request #672 from pveentjer/intellijcompatibility

Intellij fixes for Java 7