Fix Bug TDI-22876 : tReplace always case-sensitive when replacing with null
https://jira.talendforge.org/browse/TDI-22876 git-svn-id: http://talendforge.org/svn/tos/branches/branch-5_1@92443 f6f1c999-d317-4740-80b0-e6d1abc6f99e
This commit is contained in:
@@ -203,7 +203,7 @@ public class StringUtils {
|
||||
} else {
|
||||
// case 3:
|
||||
if (replacement == null) {
|
||||
if (src.equals(search)) {
|
||||
if ( (caseSensitive && src.equals(search)) || (!caseSensitive && src.equalsIgnoreCase(search))) {
|
||||
// regex != null && src != null && replacement != null, and match the whole src
|
||||
return replacement;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user