Typo fixes and cleanup of outdated Java 5 references

Issue: SPR-12020