Community
Participate
Working Groups
Build Identifier: 20110218-0911 NPE in AntUtil class, but problem is really inAntLaunchShortcut, getAdapter doesn't return a file for external files, and a null file condition isnt handled in the code. short stacktrace here, full will be attached java.lang.NullPointerException at org.eclipse.ant.internal.ui.AntUtil.isKnownAntFile(AntUtil.java:593) at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchShortcut.launch(AntLaunchShortcut.java:465) at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(LaunchShortcutExtension.java:424) Reproducible: Always Steps to Reproduce: 1.file>open file, select an external ant script 2.Run>external tools>run as 3.chose either Ant or Ant... nothing appears to be happening, check the error log and you can see the NPE
Created attachment 197916 [details] code snippet and full stack trace supporting bug 349220 code snippet and stack trace
Created attachment 199287 [details] fix when we are launching we also need to handle the case the there is no IFile handle and that there could be a file path (leading to a java.io.File handle). In this case we need to have a similar method to ask "is this a known buildfile name?". The patch adds support for external files.
applied patch to HEAD