title: Calling @Transactional method from non-transactional method in Spring 4.3
body: <p>I have the following code:</p>
  
  <pre><code>@Service
  public class ItemService {
      ...
  
      public void addItems(@Nonnull DocumentDTO dto) throws Exception {
          // some code that takes some time to process
          ...
  
          addItems(dto.getDocId(), items);
      }
  
      @Transactional
      public void addItems(long docId, @Nonnull List&lt;Item&gt; items) {
          itemDao.addItems(docId, items);
      }
  }
  </code></pre>
  
  <p>The first method is not @Transactional and it calls the second one with @Transactional.
  SonarLint tool states that "Methods should not call same-class methods with incompatible "@Transactional" values" (<a href="https://rules.sonarsource.com/java/RSPEC-2229" rel="noreferrer">https://rules.sonarsource.com/java/RSPEC-2229</a>)</p>
  
  <p>But this code works correctly in Spring 4.3.20. Is this rule actual for Spring 4.3.20?</p>
  
  <p>P.S. Interesting, if I make the second method as package-private, the SonarLint warning disappears... Why?</p>