Respect java 6 compliance