avoid nullpointer
This commit is contained in:
parent
2ea8be3b51
commit
be86a63ef9
@ -68,6 +68,7 @@ public class PacVO extends AbstractVO implements ValueObject {
|
||||
|
||||
@ReadWrite(ReadWritePolicy.READWRITE)
|
||||
@Display(sequence=70)
|
||||
@Search(SearchPolicy.EQUALS)
|
||||
private Boolean free;
|
||||
|
||||
@Required(true)
|
||||
@ -167,12 +168,15 @@ public class PacVO extends AbstractVO implements ValueObject {
|
||||
if ("pacComponents".equals(p.getName())) {
|
||||
if (persistentObject instanceof Pac) {
|
||||
final Pac persistentPac = (Pac) persistentObject;
|
||||
for (final PacComponentVO componentVO : getPacComponents()) {
|
||||
final List<PacComponentVO> pacComps = getPacComponents();
|
||||
if (pacComps != null) {
|
||||
for (final PacComponentVO componentVO : pacComps) {
|
||||
final String feature = componentVO.getFeature();
|
||||
final Integer quantity = componentVO.getQuantity();
|
||||
persistentPac.getPacComponent(feature).setQuantity(quantity);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
p.copyValueToPersistentObject(persistentObject);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user