Tweaked v3.5.2 to be as close to v4.0.0 as possible. Also fixed several
spelling mistakes in JavaDoc comments.
Merge remote-tracking branch 'origin/3.5.x' into 3.5.x