Skip to content

Commit

Permalink
CAMEL-11420 - null check added for containsIgnoreCase in StringHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
onderson committed Jun 20, 2017
1 parent 1188d00 commit 1e6be88
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -681,6 +681,10 @@ public static String trimToNull(final String given) {
* @return true/false
*/
public static boolean containsIgnoreCase(String src, String what) {
if (src == null || what == null) {
return false;
}

final int length = what.length();
if (length == 0) {
return true; // Empty string is contained
Expand Down

0 comments on commit 1e6be88

Please sign in to comment.