The {STRING}.split method takes a {CHARACTER} and not a {STRING} as argument. The documentation here
So, the split call should be like:
line.split(',')