Backport of gh-27271
Comment From: thegeekyasian
@sbrannen, do you think we should deprecate this method and add a new method called hasAnyContributors()
that returns true when the contributors list is 'not-empty'? And the deprecated method can be removed later on?
I've raised a PR for this here #27290
Comment From: sbrannen
@sbrannen, do you think we should deprecate this method and add a new method called
hasAnyContributors()
that returns true when the contributors list is 'not-empty'? And the deprecated method can be removed later on?
No, I think we should fix the existing method since it is obviously a bug.
Although the hasContributors()
method is part of the public API, it is not documented, and it is not used anywhere within Spring Framework's own code base. In light of that and the fact that nobody has ever raised an issue before you noticed it, I think it is safe to assume that no code outside of the Spring Framework is relying on the currently broken behavior. And if some one is using this method currently, they will likely be happy the method does what it claims to do.
Comment From: spring-projects-issues
Fixed via ab2a8611638c93b5e29a6846bab285b146b51c42