Now that we require Java 1.6 or newer this much more efficient implementation can be used as the default.