Solve java warnings