Addressing flume twitter source to work properly for Sampling

Based on the existing code, if a user doesn't supply the TwitterSourceConstants.KEYWORDS_KEY property (then it is intended to use twitter sampling instead of filtering). But, the exsiting code will still run filtering as

String keywordString = "";
String[] keywords = keywordString.split(",");
The result of the above statement is an array of size 1, which is not expected based on the implementation of code.