[GRADLE-874] Jetty will throw NullPointerException if project does not have a build file Created: 25/Mar/10  Updated: 04/Jan/13  Resolved: 24/Nov/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: 0.9-rc-1

Type: Bug
Reporter: Jesse Eichar Assignee: Hans Dockter
Resolution: Fixed Votes: 0

Attachments: Zip Archive jetty-null-pointer.zip    

 Description   

I have attached a project that exhibits this bug.

The exception is as follows and I have verified that the null object is the build file.

I added several lines for debugging so the line number in the stack trace may be off. I tried to remember the original. Anyhow, one line I added was:

System.out.println("buildFile: "+getProject().getBuildFile());

it printed null.

java.lang.NullPointerException: null
at org.gradle.api.plugins.jetty.JettyRun$1.filesChanged(JettyRun.java:210)
at org.mortbay.util.Scanner.reportBulkChanges(Scanner.java:486)
at org.mortbay.util.Scanner.reportDifferences(Scanner.java:352)
at org.mortbay.util.Scanner.scan(Scanner.java:280)
at org.mortbay.util.Scanner$1.run(Scanner.java:232)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)



 Comments   
Comment by Jesse Eichar [ 25/Mar/10 ]

Oh. You can't use the wrapper because I updated the build.gradle to work with the latest from trunk. (apply plugin: )

Comment by Hans Dockter [ 19/Apr/10 ]

Hi Jesse,

I can't reproduce the bug. Can you still reproduce it?

Comment by Jesse Eichar [ 19/Apr/10 ]

I just tested with a recent build and the issue appears fixed.

Generated at Wed Jun 30 11:41:09 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.