[ https://issues.apache.org/jira/browse/MNG-7738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17703629#comment-17703629 ]
ASF GitHub Bot commented on MNG-7738: ------------------------------------- elharo commented on code in PR #1064: URL: https://github.com/apache/maven/pull/1064#discussion_r1144672706 ########## maven-core/src/main/java/org/apache/maven/toolchain/RequirementMatcherFactory.java: ########## @@ -73,8 +73,6 @@ public boolean matches(String requirement) { return range.getRecommendedVersion().compareTo(version) == 0; } } catch (InvalidVersionSpecificationException ex) { - // TODO error reporting - ex.printStackTrace(); return false; Review Comment: I wish these classes were documented better, and I wish this one and several others were non-public. That said, it does seem it's used in only one other place where we do: ``` if (!matcher.matches(requirement.getValue())) { getLog().debug("Toolchain " + this + " doesn't match required property: " + key); return false; } ``` That is, a false result already logs at debug level. > Remove printStackTrace > ---------------------- > > Key: MNG-7738 > URL: https://issues.apache.org/jira/browse/MNG-7738 > Project: Maven > Issue Type: Bug > Reporter: Elliotte Rusty Harold > Assignee: Elliotte Rusty Harold > Priority: Minor > > There are multiple places in core where the code simply calls > ex.printStackTrace() or equivalent, usually in a catch block, instead of > going through the logging framework. This produces ugly, uncontrollable, > often duplicate output. Remove or replace these. -- This message was sent by Atlassian Jira (v8.20.10#820010)