Jean-Francois Leveque

sonarQube : Use constructor injection for this field.

...@@ -14,15 +14,20 @@ import java.util.Vector; ...@@ -14,15 +14,20 @@ import java.util.Vector;
14 @Stateless 14 @Stateless
15 public class SharedServiceSpring implements SharedService { 15 public class SharedServiceSpring implements SharedService {
16 16
17 - @Inject
18 CountryRepository countryRepository; 17 CountryRepository countryRepository;
19 - @Inject
20 UserRoleRepository userRoleRepository; 18 UserRoleRepository userRoleRepository;
21 - @Inject
22 UserPropertyRepository userPropertyRepository; 19 UserPropertyRepository userPropertyRepository;
23 - @Inject
24 UserService userService; 20 UserService userService;
25 21
22 + @Inject
23 + public SharedServiceSpring(CountryRepository countryRepository, UserRoleRepository userRoleRepository,
24 + UserPropertyRepository userPropertyRepository, UserService userService) {
25 + this.countryRepository = countryRepository;
26 + this.userRoleRepository = userRoleRepository;
27 + this.userPropertyRepository = userPropertyRepository;
28 + this.userService = userService;
29 + }
30 +
26 private List<DisplayNameMask> allDisplayNameMasks; 31 private List<DisplayNameMask> allDisplayNameMasks;
27 32
28 public void addCountry(Country country) { 33 public void addCountry(Country country) {
......