Project: Birt
Bug 182659 NPE throws out when drag one dimension under another dimension in the cube[1101]
Reported: 2007-04-16 21:15:44 | Status: closed fixed

Description: NPE throws out when drag one dimension under another dimension in the cube[1101] Build number: 2.2.0.v20070417-0630 Steps to reproduce: 1, New a cube with three dimensions 2, Drag the first dimension under the second dimension in the cube Expected result: No exceptions occurs Actual result: NPE occurs Error log: Error Tue Apr 17 09:13:38 GMT+08:00 2007 Unhandled event loop exception java.lang.NullPointerException at org.eclipse.birt.report.designer.util.DNDUtil.calculateNextPosition(DNDUtil.java:848) at org.eclipse.birt.report.designer.internal.ui.views.outline.dnd.DesignerDropListener.getPosition(DesignerDropListener.java:321) at org.eclipse.birt.report.designer.internal.ui.views.outline.dnd.DesignerDropListener.moveData(DesignerDropListener.java:165) at org.eclipse.birt.report.designer.internal.ui.dnd.DesignElementDropAdapter.performDrop(DesignElementDropAdapter.java:104) at org.eclipse.birt.report.designer.internal.ui.views.outline.dnd.DesignerDropListener.performDrop(DesignerDropListener.java:156) at org.eclipse.jface.viewers.ViewerDropAdapter.drop(ViewerDropAdapter.java:233) at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:962) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:947) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:706) at org.eclipse.swt.dnd.DropTarget.Drop(DropTarget.java:413) at org.eclipse.swt.dnd.DropTarget$3.method6(DropTarget.java:237) at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:117) at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method) at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:322) at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:281) at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:165) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3673) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2337) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2301) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2176) at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:463) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:458) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:101) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:146) ...

Files changed in fix:
UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/core/commands/PasteCommand.java UI/org.eclipse.birt.report.designer.core/src/org/eclipse/birt/report/designer/util/DNDUtil.java UI/org.eclipse.birt.report.designer.ui.views/src/org/eclipse/birt/report/designer/internal/ui/views/outline/dnd/DesignerDropListener.java xtab/org.eclipse.birt.report.item.crosstab.ui/src/org/eclipse/birt/report/item/crosstab/internal/ui/dnd/DimensionHandleDropAdapter.java