java.lang.NullPointerException was thrown when clearing the empty rank list. This bug is caused by careless design. To fix this bug, we simply add the following code: if(list!=null) list.clear();