Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-2221

NPE if processWorkspaceBeforeDeletion method returns false

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • other
    • None
    • Platform: All, OS: All

      I'm trying to veto the workspace cleanup process by returning false from the
      PerforceSCM.processWorkspaceBeforeDeletion(AbstractProject<?,?> project,
      FilePath workspace, Node node) method. If I do this I get the following stack
      trace:
      INFO: Started Workspace clean-up
      Exception in thread "Workspace clean-up thread" java.lang.NullPointerException
      at hudson.model.WorkspaceCleanupThread.process(WorkspaceCleanupThread.java:114)
      at hudson.model.WorkspaceCleanupThread.execute(WorkspaceCleanupThread.java:43)
      at hudson.model.PeriodicWork$1.run(PeriodicWork.java:41)
      at java.lang.Thread.run(Thread.java:619)

      If I return true then the workspace cleanup seems to work. I'm triggering a
      workspace cleanup via http://server/hudson/workspaceCleanup

            kohsuke Kohsuke Kawaguchi
            thepner thepner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: