Project: aptanastudio
Issue APSTUD-7200: NullPointerException in Utils.isDirectory()
# Connect to a FTP server # Expand the FTP server in the remote view to show folders # Take the server offline # Right-click on a directory. Get the following: {code} !ENTRY org.eclipse.ui.navigator 4 0 2012-07-26 15:43:44.890 !MESSAGE java.lang.NullPointerException !STACK 0 java.lang.NullPointerException com.aptana.ide.ui.io.Utils.isDirectory(Utils.java:50) com.aptana.ide.ui.io.navigator.actions.FileSystemPasteAction.updateSelection(FileSystemPasteAction.java:111) org.eclipse.ui.actions.BaseSelectionListenerAction.selectionChanged(BaseSelectionListenerAction.java:124) com.aptana.ide.ui.io.navigator.actions.FileSystemEditActionGroup.fillContextMenu(FileSystemEditActionGroup.java:66) com.aptana.ide.ui.io.navigator.actions.FileSystemEditActionProvider.fillContextMenu(FileSystemEditActionProvider.java:50) org.eclipse.ui.navigator.NavigatorActionService$2.run(NavigatorActionService.java:221) org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) org.eclipse.ui.navigator.NavigatorActionService.addCommonActionProviderMenu(NavigatorActionService.java:216) org.eclipse.ui.navigator.NavigatorActionService.fillContextMenu(NavigatorActionService.java:173) org.eclipse.ui.navigator.CommonNavigatorManager.fillContextMenu(CommonNavigatorManager.java:260) org.eclipse.ui.navigator.CommonNavigatorManager$4.menuAboutToShow(CommonNavigatorManager.java:275) org.eclipse.jface.action.MenuManager.fireAboutToShow(MenuManager.java:342) org.eclipse.jface.action.MenuManager.handleAboutToShow(MenuManager.java:473) org.eclipse.jface.action.MenuManager.access$1(MenuManager.java:469) org.eclipse.jface.action.MenuManager$2.menuShown(MenuManager.java:495) org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:247) org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) org.eclipse.swt.widgets.Display.sendEvent(Display.java:4125) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480) org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1461) org.eclipse.swt.widgets.Menu.menuWillOpen(Menu.java:805) org.eclipse.swt.widgets.Display.windowProc(Display.java:5522) org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method) org.eclipse.swt.internal.cocoa.NSMenu.popUpContextMenu(NSMenu.java:73) org.eclipse.swt.widgets.Menu._setVisible(Menu.java:277) org.eclipse.swt.widgets.Display.runPopups(Display.java:4048) org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3603) org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696) org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660) org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494) org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674) org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667) org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) com.appcelerator.titanium.rcp.IDEApplication.start(IDEApplication.java:125) org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344) org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:597) org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622) org.eclipse.equinox.launcher.Main.basicRun(Main.java:577) org.eclipse.equinox.launcher.Main.run(Main.java:1410) org.eclipse.equinox.launcher.Main.main(Main.java:1386) {code} Note there is a similar problem we should address with .exists()
Story points: 3