The original comment explained that protected methods allow @Transactional. However, in practice, default method is also allowed. So this should be clarified to avoid confusion.
Comment From: pivotal-cla
@shin-mallang Please sign the Contributor License Agreement!
Click here to manually synchronize the status of this Pull Request.
See the FAQ for frequently asked questions.
Comment From: pivotal-cla
@shin-mallang Thank you for signing the Contributor License Agreement!
Comment From: sbrannen
Hi @shin-mallang,
Congratulations on submitting your first PR for the Spring Framework! 👍
The original comment explained that protected methods allow @transactional. However, in practice, default method is also allowed. So this should be clarified to avoid confusion.
Interface default
methods are always supported by AnnotationTransactionAttributeSource
, since interface default
methods are public
.
The comment in question was added to explain why the AnnotationTransactionAttributeSource
constructor is now (since 6.0) invoked with false
-- which sets the publicMethodsOnly
flag to false
(which enables support for protected
@Transactional
methods).
In light of that, I am closing this PR.
Comment From: shin-mallang
@sbrannen
Oh, I'm sorry for confusing you too. I didn't mean the default method of the interface. I meant the method whose access modifier of the concreate class is package-private.
The comment in question was added to explain why the AnnotationTransactionAttributeSource constructor is now (since 6.0) invoked with false -- which sets the publicMethodsOnly flag to false (which enables support for protected @Transactional methods).
This enables support for package-private @Transactional methods as well.
I think this information should be added in a separate comment.
What do you think about adding comment by changing it to package private
instead of default
?