Project

General

Profile

Actions

bug #6466

closed

IndexOutOfBoundsException when entering month

Added by Andreas Müller almost 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
New
Assignee:
Patrick Plitzner
Category:
taxeditor
Target version:
Start date:
Due date:
% Done:

100%

Estimated time:
Severity:
normal
Found in Version:

Description

When entering the month for a field unit using "22" I got an IndexOutOfBounds (IOOB) exception.

Instead we expect only a red field indicating this is an unvalid number.

login : admin
editor version : 4.6.0.201702272351
server : test.e-taxonomy.eu (edit-test) / cichorieae
schema version : 4.1.0.0.201607300000
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
java.lang.IndexOutOfBoundsException: Value must be between 1 and 12
    at eu.etaxonomy.cdm.model.common.TimePeriod.checkFieldValues(TimePeriod.java:466)
    at eu.etaxonomy.cdm.model.common.TimePeriod.setPartialField(TimePeriod.java:417)
    at eu.etaxonomy.taxeditor.ui.element.PartialElement.handleEvent(PartialElement.java:122)
    at eu.etaxonomy.taxeditor.ui.element.PartialElement.propertyChange(PartialElement.java:106)
    at eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement.firePropertyChangeEvent(AbstractCdmFormElement.java:235)
    at eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement.modifyText(NumberWithLabelElement.java:133)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
    at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2610)
    at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:4669)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4531)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4985)
    at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2425)
    at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:255)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Text.windowProc(Text.java:2254)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Actions #1

Updated by Andreas Müller almost 7 years ago

  • Assignee changed from Andreas Müller to Patrick Plitzner
Actions #2

Updated by Patrick Plitzner almost 7 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 50
Actions #3

Updated by Patrick Plitzner almost 7 years ago

  • Assignee changed from Patrick Plitzner to Andreas Müller
Actions #4

Updated by Andreas Müller over 6 years ago

  • Status changed from Resolved to Feedback
  • Assignee changed from Andreas Müller to Patrick Plitzner

Works for the given problem. But I still got an issue when entering month=2 and day = 31 (year = 1886)

login : admin
editor version : 4.6.0.201703092001
server : test.e-taxonomy.eu (edit-test) / rem_conf_am
schema version : 4.1.0.0.201607300000
os : Windows Server 2012 R2 6.3 amd64
java : 1.8.0_121
org.joda.time.IllegalFieldValueException: Value 31 for dayOfMonth must not be larger than 28
    at org.joda.time.chrono.BaseChronology.validate(BaseChronology.java:208)
    at org.joda.time.Partial.<init>(Partial.java:272)
    at org.joda.time.Partial.with(Partial.java:495)
    at eu.etaxonomy.cdm.model.common.TimePeriod.setPartialField(TimePeriod.java:418)
    at eu.etaxonomy.taxeditor.ui.element.PartialElement.handleEvent(PartialElement.java:122)
    at eu.etaxonomy.taxeditor.ui.element.PartialElement.propertyChange(PartialElement.java:106)
    at eu.etaxonomy.taxeditor.ui.element.AbstractCdmFormElement.firePropertyChangeEvent(AbstractCdmFormElement.java:235)
    at eu.etaxonomy.taxeditor.ui.element.TextWithLabelElement.modifyText(TextWithLabelElement.java:186)
    at eu.etaxonomy.taxeditor.ui.element.NumberWithLabelElement.modifyText(NumberWithLabelElement.java:141)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:179)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1058)
    at org.eclipse.swt.widgets.Text.wmCommandChild(Text.java:2610)
    at org.eclipse.swt.widgets.Control.WM_COMMAND(Control.java:4669)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4531)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4985)
    at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2425)
    at org.eclipse.swt.widgets.Text.callWindowProc(Text.java:255)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4623)
    at org.eclipse.swt.widgets.Text.windowProc(Text.java:2254)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4972)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2531)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3752)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2701)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2665)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2499)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:679)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:668)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at eu.etaxonomy.taxeditor.Application.start(Application.java:24)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
Actions #5

Updated by Patrick Plitzner over 6 years ago

  • Assignee changed from Patrick Plitzner to Andreas Müller
Actions #6

Updated by Andreas Müller over 6 years ago

  • Status changed from Feedback to Resolved
Actions #7

Updated by Andreas Müller over 6 years ago

  • Status changed from Resolved to Closed
  • Assignee changed from Andreas Müller to Patrick Plitzner

Works fine now

Actions #8

Updated by Andreas Müller over 6 years ago

  • % Done changed from 50 to 100
Actions #9

Updated by Andreas Müller over 6 years ago

There was still an open issue when the day was first set and then month for a combination that does not exist (e.g. 2/30 or 4/31). In this case an exception was thrown as before. I adapted the code to handle this situation in df566dafc6 (#6454).
There is still a little strange behavior that the date is now automatically adjusted to a valid date.
This should be fixed once but I don't think it is really critical so for now I don't open a new ticket.

Actions

Also available in: Atom PDF