Replaced Collection.size() > 0 through !Collection.isEmpty()