修复空指针异常
This commit is contained in:
+4
-4
@@ -2457,8 +2457,8 @@ public class DistrictServiceImpl implements DistrictService {
|
||||
params.add(new QueryParam(QueryParam.SD_PARAM_NAME, sdQuery));
|
||||
List<District> list = districtDao.findAllByParams(params, null, 0, limit * 2,
|
||||
new String[] { "city", "region", "name", "estateType2", "id" });
|
||||
if (list.size() == 0) {
|
||||
return Collections.EMPTY_LIST;
|
||||
if (list.isEmpty()) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
List<District> ret = new ArrayList<District>();
|
||||
@@ -2467,8 +2467,8 @@ public class DistrictServiceImpl implements DistrictService {
|
||||
&& district.getCity().equals(d.getCity())) {
|
||||
continue;
|
||||
}
|
||||
if (d.getEstateType2() != null) {
|
||||
if (d.getEstateType2().indexOf(district.getEstateType2()) > -1) {
|
||||
if (d.getEstateType2() != null && district.getEstateType2() != null) {
|
||||
if (d.getEstateType2().contains(district.getEstateType2())) {
|
||||
ret.add(d);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user