Making project java6 compliant