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.
What you wrote does not match the code:
Intention is to take a current line which contains commas, store trimmed values of all space and store the line into the array.
It seams, by the code, that you want all spaces removed and split the resulting string at the commas (not described). That can be done as Paul Tomblin suggested.
String[] currentLineArray = currentInputLine.replaceAll("\\s", "").split(",");
If you want to split at the commas and remove leading and trailing spaces (trim) from the resulting parts, use:
String[] currentLineArray = currentInputLine.trim().split("\\s*,\\s*");
(trim()
is needed to remove leading spaces of first part and trailing space from last part)