Project: Birt
Bug 224021 [Smoke]Copy dataset from one report to another report will crash the BIRT
Reported: 2008-03-25 23:03:33 | Status: closed fixed

Description: [Regression]Copy dataset from one report to another report will crash the BIRT Build number: 2.3.0.v20080326-0800 Steps to reproduce: 1, Open two reports: A and B. 2, Select a dataset in A report and copy it 3, Turn to B report Expected result: No exception occurs Actual result: Multiple Exceptions throw out and crash the eclipse. Error log: java.lang.NullPointerException at org.eclipse.birt.report.model.util.copy.ContextCopiedElement.getHandle(ContextCopiedElement.java:152) at org.eclipse.birt.report.designer.util.DNDUtil.handleValidateTargetCanContain(DNDUtil.java:1034) at org.eclipse.birt.report.designer.util.DNDUtil.handleValidateTargetCanContain(DNDUtil.java:983) at org.eclipse.birt.report.designer.util.DNDUtil.handleValidateTargetCanContain(DNDUtil.java:946) at org.eclipse.birt.report.designer.internal.ui.views.actions.PasteAction.isEnabled(PasteAction.java:89) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.actions.WrapperSelectionAction.calculateEnabled(WrapperSelectionAction.java:51) at org.eclipse.gef.ui.actions.WorkbenchPartAction.refresh(WorkbenchPartAction.java:119) at org.eclipse.gef.ui.actions.SelectionAction.handleSelectionChanged(SelectionAction.java:85) at org.eclipse.birt.report.designer.internal.ui.editors.schematic.actions.WrapperSelectionAction.handleSelectionChanged(WrapperSelectionAction.java:80) at org.eclipse.gef.ui.actions.SelectionAction.setSelection(SelectionAction.java:96) at org.eclipse.gef.ui.actions.SelectionAction.update(SelectionAction.java:117) at org.eclipse.birt.report.designer.internal.ui.editors.parts.GraphicalEditorWithFlyoutPalette.updateActions(GraphicalEditorWithFlyoutPalette.java:697) at org.eclipse.birt.report.designer.internal.ui.editors.layout.ReportEditorWithRuler.selectionChanged(ReportEditorWithRuler.java:168) at org.eclipse.ui.internal.AbstractSelectionService.fireSelection(AbstractSelectionService.java:156) at org.eclipse.ui.internal.AbstractSelectionService.setActivePart(AbstractSelectionService.java:282) at org.eclipse.ui.internal.WWinPartService.updateActivePart(WWinPartService.java:125) at org.eclipse.ui.internal.WWinPartService.access$0(WWinPartService.java:115) at org.eclipse.ui.internal.WWinPartService$1.partDeactivated(WWinPartService.java:48) at org.eclipse.ui.internal.PartListenerList2$4.run(PartListenerList2.java:113) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.runtime.Platform.run(Platform.java:857)

Files changed in fix:
model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/util/copy/ContextCopiedElement.java