UETsegmenter icon indicating copy to clipboard operation
UETsegmenter copied to clipboard

Code Review

Open iamloivx opened this issue 7 years ago • 1 comments

Multiple meaningless null checks

Example: https://github.com/phongnt570/UETsegmenter/blob/master/src/vn/edu/vnu/uet/nlp/tokenizer/Tokenizer.java#L25

s can not be null. You already call s before.

String[] tempTokens = s.split("(\\s| )+");
if (trimed.isEmpty() || trimed.equals(StringConst.SPACE) || s == null || tempTokens.length == 0) {
     return tokens;
}

iamloivx avatar Apr 24 '17 02:04 iamloivx

Thanks for your useful feedback. I am revising to clean the code.

phongnt570 avatar Apr 24 '17 04:04 phongnt570