Fixed JDK7 compiler warnings in api and core modules