Make code Java6 compliant