Project

General

Profile

Revision 361f2123

ID361f2123e6fd31a0747124531bd87c367a10ea26
Parent c88cdfbe
Child cd19940f

Added by Patrick Plitzner over 3 years ago

fix #6466 Fix possible IndexOutOfBoundException

View differences:

eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/element/PartialElement.java
51 51
		addControl(label);
52 52

  
53 53
		number_year = formFactory.createNumberTextWithLabelElement(this, "Year", null, style);
54
		number_year.setLimits(4, -9999, 9999);
54
		number_year.setLimits(4, 0, 9999);
55 55

  
56 56
		number_month = formFactory.createNumberTextWithLabelElement(this, "Month", null, style);
57 57
		number_month.setLimits(2, 1, 12);
......
115 115
	}
116 116

  
117 117
	private void handleEvent(Object eventSource){
118
		if(eventSource == number_month){
118
		if(eventSource == number_month && number_month.getException()==null){
119 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
		}else if(eventSource == number_day){
125
		}else if(eventSource == number_day && number_day.getException()==null){
126 126
			if (number_day.getInteger() == null || number_day.getInteger() == 0){
127 127
				partial = TimePeriod.setPartialField(partial, null, TimePeriod.DAY_TYPE);
128 128
			} else{
......
130 130
			}
131 131

  
132 132

  
133
		}else if(eventSource == number_year){
133
		}else if(eventSource == number_year && number_year.getException()==null){
134 134
			if (number_year.getInteger() == null || number_year.getInteger() == 0){
135 135
				partial = TimePeriod.setPartialField(partial, null, TimePeriod.YEAR_TYPE);
136 136
			} else{

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)