You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Michael Osipov (Jira)" <ji...@apache.org> on 2023/05/30 17:58:00 UTC

[jira] [Commented] (SUREFIRE-2172) StringUtils: yet more of them

    [ https://issues.apache.org/jira/browse/SUREFIRE-2172?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17727641#comment-17727641 ] 

Michael Osipov commented on SUREFIRE-2172:
------------------------------------------

So we are talking about:
{noformat}
$ grep -r --include='*.java' StringUtils . | grep -v -e org.apache.maven.surefire.shared -v -e org.apache.maven.surefire.api.util.internal.StringUtils | grep import
./surefire-its/src/test/java/org/apache/maven/surefire/its/JUnit47RedirectOutputIT.java:import org.apache.commons.lang3.StringUtils;
./surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/ReportTestCase.java:import static org.apache.maven.shared.utils.StringUtils.isNotBlank;
./surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/SurefireReportParser.java:import static org.apache.maven.shared.utils.StringUtils.split;
./surefire-report-parser/src/main/java/org/apache/maven/plugins/surefire/report/TestSuiteXmlParser.java:import static org.apache.maven.shared.utils.StringUtils.isBlank;
{noformat}
and at the end it is only:
{noformat}
$ grep -r --include='*.java' StringUtils . | grep -v -e org.apache.maven.surefire.shared -v -e org.apache.maven.surefire.api.util.internal.StringUtils | grep import
./surefire-its/src/test/java/org/apache/maven/surefire/its/JUnit47RedirectOutputIT.java:import org.apache.commons.lang3.StringUtils;
{noformat}

Right?


> StringUtils: yet more of them
> -----------------------------
>
>                 Key: SUREFIRE-2172
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2172
>             Project: Maven Surefire
>          Issue Type: Improvement
>            Reporter: Elliotte Rusty Harold
>            Priority: Minor
>
> This project contains not one, not two, but **three** different StringUtils classes that duplicate functionality in the JDK and elsewhere. One or two of them imght be built by shading other classes. They're even sometimes both imported in the same classes such as LegacyPojoStackTraceWriter:
> import org.apache.maven.surefire.api.util.internal.StringUtils;
> import static org.apache.maven.surefire.shared.utils.StringUtils.isNotEmpty;
> Figure out what to do about this. 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)