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/14 16:48:31 UTC

[GitHub] [maven-ear-plugin] timtebeek commented on a diff in pull request #93: [MNG-6829] Replace StringUtils#isEmpty(String) and #isNotEmpty(String)

timtebeek commented on code in PR #93:
URL: https://github.com/apache/maven-ear-plugin/pull/93#discussion_r1193177563


##########
src/main/java/org/apache/maven/plugins/ear/EjbRef.java:
##########
@@ -56,11 +55,11 @@
      */
     public EjbRef( String description, String name, String type, String lookupName )
     {
-        if ( StringUtils.isEmpty( name ) )
+        if ( name == null || name.isEmpty() )
         {
             throw new IllegalArgumentException( EJB_NAME + " in " + EJB_REF + " element cannot be null." );
         }
-        else if ( StringUtils.isEmpty( type ) && StringUtils.isEmpty( lookupName ) )
+        else if ( (type == null || type.isEmpty()) && (lookupName == null || lookupName.isEmpty()) )

Review Comment:
   ```suggestion
           else if ( ( type == null || type.isEmpty() ) && ( lookupName == null || lookupName.isEmpty() ) )
   ```



##########
src/main/java/org/apache/maven/plugins/ear/EnvEntry.java:
##########
@@ -54,11 +53,11 @@
 
     EnvEntry( String description, String name, String type, String value, String lookupName )
     {
-        if ( StringUtils.isEmpty( name ) )
+        if ( name == null || name.isEmpty() )
         {
             throw new IllegalArgumentException( ENV_ENTRY_NAME + " in " + ENV_ENTRY + " element cannot be null." );
         }
-        else if ( StringUtils.isEmpty( type ) && StringUtils.isEmpty( value ) )
+        else if ( (type == null || type.isEmpty()) && (value == null || value.isEmpty()) )

Review Comment:
   ```suggestion
           else if ( ( type == null || type.isEmpty() ) && ( value == null || value.isEmpty() ) )
   
   ```



-- 
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