Fixing the compilation errors due to the usage of java 7.