btpka3 commented on code in PR #1004:
URL: https://github.com/apache/maven-enforcer/pull/1004#discussion_r3823688444
##########
enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/BannedPlugins.java:
##########
@@ -78,7 +78,12 @@ public void execute() throws EnforcerRuleException {
(m1, m2) -> m1.append(m2.toString()))
.toString();
if (!result.isEmpty()) {
- throw new EnforcerRuleException(result);
+ StringBuilder buf = new StringBuilder();
+ if (getMessage() != null) {
+ buf.append(getMessage()).append(System.lineSeparator());
Review Comment:
Fixed. Replaced System.lineSeparator() with "\n" in all affected files (see
commit d4f64b5).
##########
enforcer-rules/src/main/java/org/apache/maven/enforcer/rules/BannedRepositories.java:
##########
@@ -91,7 +91,12 @@ public void execute() throws EnforcerRuleException {
String errMsg = repoErrMsg + pluginRepoErrMsg;
if (!errMsg.isEmpty()) {
- throw new EnforcerRuleException(errMsg);
+ StringBuilder buf = new StringBuilder();
+ if (getMessage() != null) {
+ buf.append(getMessage()).append(System.lineSeparator());
Review Comment:
Fixed. Replaced System.lineSeparator() with "\n" in all affected files (see
commit d4f64b5).
--
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]