minor modifications to avoid NPEs in property group property list handling
This commit is contained in:
parent
85d21c5c59
commit
adf5558aa4
2 changed files with 4 additions and 2 deletions
|
@ -106,7 +106,7 @@ public abstract class BaseIndividualTemplateModel extends BaseTemplateModel {
|
|||
}
|
||||
|
||||
public GroupedPropertyList getPropertyList() {
|
||||
if (propertyList == null) {
|
||||
if (!(propertyList instanceof GroupedPropertyList)) {
|
||||
propertyList = new GroupedPropertyList(individual, vreq, policyHelper);
|
||||
}
|
||||
return propertyList;
|
||||
|
|
|
@ -337,7 +337,9 @@ public class GroupedPropertyList extends BaseTemplateModel {
|
|||
|
||||
// Clear out the property lists on the groups
|
||||
for (PropertyGroup pg : groupList) {
|
||||
if (pg.getPropertyList().size() > 0) {
|
||||
if (pg.getPropertyList() == null) {
|
||||
pg.setPropertyList(new ArrayList<Property>());
|
||||
} else if (pg.getPropertyList().size() > 0) {
|
||||
pg.getPropertyList().clear();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue