backport 1.7 -> 1.6

Replaced diamond operator <> with explicit type arguments.