timtebeek commented on code in PR #272:
URL: https://github.com/apache/maven-enforcer/pull/272#discussion_r1200257124
##########
enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/BannedRepositories.java:
##########
@@ -91,7 +90,7 @@ public void execute() throws EnforcerRuleException {
String errMsg = repoErrMsg + pluginRepoErrMsg;
- if (errMsg != null && !StringUtils.isEmpty(errMsg)) {
+ if (errMsg != null && !(errMsg == null || errMsg.isEmpty())) {
Review Comment:
Yes thanks! Applied just now.
We're looking to [add nullability to our type
system](https://github.com/openrewrite/rewrite/issues/3221), such that we no
longer add duplicate null checks where they are not necessary, and clean them
up with a subsequent recipe.
In addition to that there's unfortunately some not-ideal use of
`!StringUtils.isEmpty()` instead of `StringUtils.isNotEmpty()`; we've discussed
whether to tackle that separately first, but as we're phasing these calls out
we decided against that for now. Nearly there. :)
--
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]