Intention is to take a current line (String that contains commas), replace white space with \"\" (Trim space) and finally store split String elements into the array.
And replaceAll("\\s","") will remove all spaces, not just the redundant ones. If that's not what you want, you should try replaceAll("\\s+","\\s") or something like that.