Fix Sonar warnings: Use collection interfaces in declarations.