Skip to content

Commit af80b5e

Browse files
committed
Replaced custom code by JRE 6 method
1 parent 8b3721e commit af80b5e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/org/codehaus/plexus/util/StringUtils.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public static String deleteWhitespace( String str )
158158
*/
159159
public static boolean isNotEmpty( String str )
160160
{
161-
return ( ( str != null ) && ( str.length() > 0 ) );
161+
return ( ( str != null ) && ( !str.isEmpty() ) );
162162
}
163163

164164
/**
@@ -174,7 +174,7 @@ public static boolean isNotEmpty( String str )
174174
*/
175175
public static boolean isEmpty( String str )
176176
{
177-
return ( ( str == null ) || ( str.trim().length() == 0 ) );
177+
return ( ( str == null ) || ( str.trim().isEmpty() ) );
178178
}
179179

180180
/**

0 commit comments

Comments
 (0)