Revision b0174081
Added by Andreas Müller over 7 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PartialElement.java | ||
---|---|---|
116 | 116 |
|
117 | 117 |
private void handleEvent(Object eventSource){ |
118 | 118 |
if(eventSource == number_month){ |
119 |
if (number_month.getInteger() == 0){ |
|
119 |
if (number_month.getInteger() == null || number_month.getInteger() == 0){
|
|
120 | 120 |
partial = TimePeriod.setPartialField(partial, null, TimePeriod.MONTH_TYPE); |
121 | 121 |
} else{ |
122 | 122 |
partial = TimePeriod.setPartialField(partial, number_month.getInteger(), TimePeriod.MONTH_TYPE); |
123 | 123 |
} |
124 | 124 |
|
125 | 125 |
}else if(eventSource == number_day){ |
126 |
if (number_day.getInteger() == 0){ |
|
126 |
if (number_day.getInteger() == null || number_day.getInteger() == 0){
|
|
127 | 127 |
partial = TimePeriod.setPartialField(partial, null, TimePeriod.DAY_TYPE); |
128 | 128 |
} else{ |
129 | 129 |
partial = TimePeriod.setPartialField(partial, number_day.getInteger(), TimePeriod.DAY_TYPE); |
... | ... | |
131 | 131 |
|
132 | 132 |
|
133 | 133 |
}else if(eventSource == number_year){ |
134 |
if (number_year.getInteger() == 0){ |
|
134 |
if (number_year.getInteger() == null || number_year.getInteger() == 0){
|
|
135 | 135 |
partial = TimePeriod.setPartialField(partial, null, TimePeriod.YEAR_TYPE); |
136 | 136 |
} else{ |
137 | 137 |
partial = TimePeriod.setPartialField(partial, number_year.getInteger(), TimePeriod.YEAR_TYPE); |
Also available in: Unified diff
fix #6433 fix NPE in PartialElement