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:
jyhu
2012-10-19 03:44:26 +00:00
parent 7ef8c0d6e7
commit 8b4a2c662a

View File

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