[BLUEJ-333] .java file symlinks cause an exception
I actually triggered this in Greenfoot, but the trace is entirely within BlueJ. I had a .java file which lives in a different directory (because it's in version control there), and I symlinked to it from the Greenfoot scenario directory, hoping that it would edit and compile the file regardless of it happening to be a link. However:
{noformat} Exception during compilation: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at bluej.compiler.EventqueueCompileObserver.runOnEventQueue(EventqueueCompileObserver.java:72) at bluej.compiler.EventqueueCompileObserver.startCompile(EventqueueCompileObserver.java:81) at bluej.compiler.Job.compile(Job.java:73) at bluej.compiler.CompilerThread.run(CompilerThread.java:70) Caused by: java.lang.reflect.InvocationTargetException at java.awt.EventQueue.invokeAndWait(EventQueue.java:998) at bluej.compiler.EventqueueCompileObserver.runOnEventQueue(EventqueueCompileObserver.java:69) ... 3 more Caused by: java.lang.NullPointerException at bluej.utility.JavaNames.getBase(JavaNames.java:142) at bluej.pkgmgr.Package$QuietPackageCompileObserver.markAsCompiling(Package.java:2371) at bluej.pkgmgr.Package$QuietPackageCompileObserver.startCompile(Package.java:2410) at bluej.compiler.EventqueueCompileObserver.run(EventqueueCompileObserver.java:119) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199) at java.awt.EventQueue.dispatchEvent(EventQueue.java:597) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161) at java.awt.EventDispatchThread.run(EventDispatchThread.java:122) {noformat}
I don't mind if this isn't a behaviour we want to support, but that exception completely freezes Greenfoot, so it might be one we want to handle more gracefully.
Issue metadata
- Issue type: Bug
- Priority: Low
- Fix versions: 3.0.5