[ https://issues.apache.org/jira/browse/MNG-7738?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17703631#comment-17703631 ]
ASF GitHub Bot commented on MNG-7738: ------------------------------------- elharo commented on code in PR #1064: URL: https://github.com/apache/maven/pull/1064#discussion_r1144677160 ########## maven-core/src/test/java/org/apache/maven/repository/TestRepositorySystem.java: ########## @@ -229,7 +229,7 @@ public ArtifactResolutionResult resolve(ArtifactResolutionRequest request) { .map(Dependency::new) .collect(Collectors.toList()); } catch (IOException e) { - e.printStackTrace(); Review Comment: Given that this is test code, debug logging seems too weak. If this is a problem worth paying attention to, or that might explain why a test has failed or flaked, then bubble the IOException to immediately fail the test with the root cause rather than waiting for it to fail down the line. On the other hand, if the test shouldn't and doesn't fail when this exception is thrown, then no debug log is needed. > 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)