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

ASF GitHub Bot commented on MNG-6829:
-------------------------------------

timtebeek commented on code in PR #3:
URL: https://github.com/apache/maven-jarsigner/pull/3#discussion_r1202293944


##########
src/main/java/org/apache/maven/shared/jarsigner/JarSignerCommandLineBuilder.java:
##########
@@ -82,28 +82,28 @@ public Commandline build( JarSignerRequest request )
         }
 
         String storetype = request.getStoretype();
-        if ( !StringUtils.isEmpty( storetype ) )
+        if ( !(storetype == null || storetype.isEmpty()) )
         {
             cli.createArg().setValue( "-storetype" );
             cli.createArg().setValue( storetype );
         }
 
         String providerName = request.getProviderName();
-        if ( !StringUtils.isEmpty( providerName ) )
+        if ( !(providerName == null || providerName.isEmpty()) )
         {
             cli.createArg().setValue( "-providerName" );
             cli.createArg().setValue( providerName );
         }
 
         String providerClass = request.getProviderClass();
-        if ( !StringUtils.isEmpty( providerClass ) )
+        if ( !(providerClass == null || providerClass.isEmpty()) )

Review Comment:
   No it's a bit unfortunate; would have required a separate recipe (or 
targeted manual change) to first replace the `!StringUtils.isEmpty` with 
`StringUtils.isNotEmpty`. But then since we are phasing these out we decided 
against it on an earlier pull request.
   
   In this specific case we can fix these manually here if you'd like, as I 
imagine checkstyle will have it's complaints as well.





> Remove commons-lang3 dependency
> -------------------------------
>
>                 Key: MNG-6829
>                 URL: https://issues.apache.org/jira/browse/MNG-6829
>             Project: Maven
>          Issue Type: Sub-task
>          Components: Bootstrap & Build
>    Affects Versions: 3.6.3
>            Reporter: Karl Heinz Marbaise
>            Assignee: Karl Heinz Marbaise
>            Priority: Minor
>              Labels: close-pending
>             Fix For: 4.0.x-candidate
>
>         Attachments: dtPKn.xlsx
>
>
> Currently we use {{commons-lang3}} for the following classes
> * {{StringUtils}} can be replaced by usage of either {{plexus-utils}} or 
> {{maven-shared-utils}} or as I tested with self implementation
> * {{SystemUtils}} is only used in some tests which can simply replaced by 
> using JUnit Jupiter with all the support it has.
> * {{Validate}} is a precondition class which checks for parameters etc. can 
> be implemented very easily (done already to see how it works). Later this 
> could be made part of {{maven-shared-utils}}.
> * Currently the {{StringUtils.substringAfterLast( resourceName,  "/" )}} is 
> used in {{ConsoleMavenTransferListener}}



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

Reply via email to