adamsaghy commented on code in PR #4353:
URL: https://github.com/apache/fineract/pull/4353#discussion_r1967557541
##########
fineract-provider/src/main/java/org/apache/fineract/infrastructure/campaigns/sms/service/SmsCampaignReadPlatformServiceImpl.java:
##########
@@ -52,28 +54,22 @@
import org.springframework.stereotype.Service;
@Service
+@RequiredArgsConstructor
public class SmsCampaignReadPlatformServiceImpl implements
SmsCampaignReadPlatformService {
- private final BusinessRuleMapper businessRuleMapper;
private final JdbcTemplate jdbcTemplate;
private final DatabaseSpecificSQLGenerator sqlGenerator;
private final SmsCampaignDropdownReadPlatformService
smsCampaignDropdownReadPlatformService;
- private final SmsCampaignMapper smsCampaignMapper;
private final CalendarDropdownReadPlatformService
calendarDropdownReadPlatformService;
private final PaginationHelper paginationHelper;
+ private final SqlValidator sqlValidator;
+ private BusinessRuleMapper businessRuleMapper;
+ private SmsCampaignMapper smsCampaignMapper;
- @Autowired
- public SmsCampaignReadPlatformServiceImpl(final JdbcTemplate jdbcTemplate,
- SmsCampaignDropdownReadPlatformService
smsCampaignDropdownReadPlatformService,
- final CalendarDropdownReadPlatformService
calendarDropdownReadPlatformService, DatabaseSpecificSQLGenerator sqlGenerator,
- PaginationHelper paginationHelper) {
- this.jdbcTemplate = jdbcTemplate;
- this.sqlGenerator = sqlGenerator;
+ @PostConstruct
+ public void init() {
this.businessRuleMapper = new BusinessRuleMapper(sqlGenerator);
Review Comment:
Should we just do the initialization at field definition?
```
private final SmsCampaignMapper smsCampaignMapper = new SmsCampaignMapper();
private final BusinessRuleMapper this.businessRuleMapper = new
BusinessRuleMapper(sqlGenerator);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]