bug #6424
closedEmpty name creates problem/NPE in name editor
50%
Description
When pressing return on the end of the synonymy list a new empty record appears. When trying to save it is labeled "Click to add name" and a warning is given that an attempt was made to save a taxon/synonym with an empty name.
When trying to delete this name an NPE is thrown:
login : admin editor version : 4.6.0.201702161652 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.eclipse.core.commands.ExecutionException: While executing the operation, an exception occurred at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:521) at eu.etaxonomy.taxeditor.model.AbstractUtility$1.run(AbstractUtility.java:345) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:464) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:372) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:759) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:756) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:2649) at org.eclipse.ui.internal.progress.ProgressManager$RunnableWithStatus.run(ProgressManager.java:1346) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70) at org.eclipse.ui.internal.progress.ProgressManager$7.run(ProgressManager.java:1184) at org.eclipse.swt.widgets.Synchronizer.syncExec(Synchronizer.java:180) at org.eclipse.ui.internal.UISynchronizer.syncExec(UISynchronizer.java:150) at org.eclipse.swt.widgets.Display.syncExec(Display.java:4683) at org.eclipse.ui.internal.progress.ProgressManager.runInUI(ProgressManager.java:1182) at eu.etaxonomy.taxeditor.model.AbstractUtility.runInUI(AbstractUtility.java:657) at eu.etaxonomy.taxeditor.model.AbstractUtility.executeOperation(AbstractUtility.java:363) at eu.etaxonomy.taxeditor.editor.name.handler.DeleteTaxonBaseHandler.doExecute(DeleteTaxonBaseHandler.java:91) at eu.etaxonomy.taxeditor.editor.name.handler.DeleteTaxonBaseHandler.execute(DeleteTaxonBaseHandler.java:56) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829) at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815) at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805) 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.Display.runDeferredEvents(Display.java:4165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) 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) Caused by: java.lang.NullPointerException at eu.etaxonomy.taxeditor.editor.name.operation.DeleteSynonymOperation.execute(DeleteSynonymOperation.java:75) at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513) ... 52 more
This happens for both "delete" and "delete all names".
It is difficult to get rid of this empty name (only by filling it and then delete it, but also then, if the name was not yet saved an NPE is thrown when trying to delete)
Updated by Andreas Müller over 6 years ago
- Target version changed from Unassigned CDM tickets to Release 4.6
Updated by Katja Luther about 6 years ago
- Status changed from New to Resolved
- % Done changed from 0 to 50
Applied in changeset taxeditor|b8da2ad780bc334e229c35bdaefb3e687fc99889.
Updated by Katja Luther about 6 years ago
- Assignee changed from Katja Luther to Andreas Müller
please review
Updated by Andreas Müller about 6 years ago
- Description updated (diff)
- Status changed from Resolved to Closed
- Assignee changed from Andreas Müller to Katja Luther
Seems to work correctly now.
Updated by Andreas Müller about 6 years ago
- Status changed from Closed to Feedback
Sorry, I have to reopen.
When I tried to delete the name with "Delete all empty names" I still got an NPE, while delete for a single name works.
login : admin editor version : 4.6.0.201703092001 server : (edit-test) schema version : os : Windows Server 2012 R2 6.3 amd64 java : 1.8.0_121 java.lang.NullPointerException at eu.etaxonomy.taxeditor.editor.name.handler.DeleteTaxonBaseHandler.doExecute(DeleteTaxonBaseHandler.java:81) at eu.etaxonomy.taxeditor.editor.name.handler.DeleteAllEmptyNamesHandler.execute(DeleteAllEmptyNamesHandler.java:37) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:293) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508) at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:241) at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:829) at org.eclipse.ui.menus.CommandContributionItem.access$19(CommandContributionItem.java:815) at org.eclipse.ui.menus.CommandContributionItem$5.handleEvent(CommandContributionItem.java:805) 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.Display.runDeferredEvents(Display.java:4165) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3754) 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)
Updated by Katja Luther about 6 years ago
- Status changed from Feedback to Resolved
Applied in changeset taxeditor|898894c82879b1b37fe04b055cdc70bce67bb183.
Updated by Katja Luther about 6 years ago
- Status changed from Resolved to Feedback
sorry, now it works also with delete all empty names.
Updated by Katja Luther about 6 years ago
- Status changed from Feedback to Resolved
- Assignee changed from Katja Luther to Andreas Müller
Updated by Andreas Müller about 6 years ago
Could you still adapt the message that is shown if one tries to save a taxon with empty names "Es wurde versucht ein Taxon oder Synonym mit einem leeren Namen zu speichern. Vorgang abgebrochen" in a way that it is mentioned that there is a "Delete all empty names" functionality.
E.g. "... Use the 'Delete all empty names' functionality from right click menu to remove empty names."
Updated by Andreas Müller about 6 years ago
- Status changed from Resolved to Feedback
- Assignee changed from Andreas Müller to Katja Luther
Generally it works now and ticket can be closed.
Updated by Katja Luther about 6 years ago
- Status changed from Feedback to Closed
Updated by Andreas Müller about 6 years ago
Can you please leave a message if you have changed the message mentioned in comment #10 somehow?