ItEr49S04ValidacionEProbasFuncionaisItEr48S04: [Bug #358] Fixing NullPointerException when percentage checkbox is set in advance type administration.

This commit is contained in:
Manuel Rego Casasnovas 2010-03-02 12:18:27 +01:00 committed by Javier Moran Rua
parent ffb9761a6f
commit b59d396f4d

View file

@ -189,7 +189,8 @@ public class AdvanceType extends BaseEntity {
public void setPercentage(boolean percentage) {
if (percentage) {
if (defaultMaxValue.compareTo(new BigDecimal(100)) > 0) {
if ((defaultMaxValue != null)
&& (defaultMaxValue.compareTo(new BigDecimal(100)) > 0)) {
throw new IllegalArgumentException(
"The maximum value for percentage is 100");
}