You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "timtebeek (via GitHub)" <gi...@apache.org> on 2023/05/23 13:04:20 UTC

[GitHub] [maven-jarsigner] timtebeek commented on a diff in pull request #3: [MNG-6829] Replace StringUtils#isEmpty(String) & #isNotEmpty(String)

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.



-- 
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: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org