Fixed all warnings in Java code