Uploaded image for project: 'BlueJ'
  1. BlueJ
  2. BLUEJ-333

.java file symlinks cause an exception

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Low
    • Resolution: Done
    • Affects Version/s: 3.0.4
    • Fix Version/s: 3.0.5
    • Component/s: Compiler

      Description

      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:

      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)
      

      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.

        Attachments

          Activity

            People

            • Assignee:
              davmac Davin McCall
              Reporter:
              nccb Neil Brown
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: