I'm struggling with sonar issue:
squid:S2229 "Methods should not call same-class methods with incompatible "@Transactional" values"
I'm not sure how am I supposed to resolve this. Should I add @Transactional
above clean method or something? Or even delete @Transactional
annotation.
@Override
public void clean(BooleanSupplier isInterrupted) {
// other code
while (shouldContinue(isInterrupted) && partitionsIterator.hasNext()) {
PartitionDeleteSql partition = partitionsIterator.next();
execute(partition);
}
}
@Transactional
public void execute(PartitionDeleteSql sql) {
// other code
getJdbcTemplate().execute(sql....());
getJdbcTemplate().execute(sql....());
getJdbcTemplate().execute(sql....());
}