[GRADLE-503] AbstractJettyRunTask throws NPE Created: 26/May/09 Updated: 04/Jan/13 Resolved: 28/May/09 |
|
Status: | Resolved |
Project: | Gradle |
Affects Version/s: | None |
Fix Version/s: | 0.6.1 |
Type: | Bug | ||
Reporter: | Shanon McQuay | Assignee: | Hans Dockter |
Resolution: | Fixed | Votes: | 0 |
Description |
Just ran into some trouble when upgrading gradle from 0.5.2 to 0.6. I'm getting the following stack trace... Caused by: org.gradle.api.GradleException: An error occurred starting the Jetty server. I had a quick look at the code and my guess is that the following code is the culprit: if (getStopPort() > 0 && getStopKey() != null) { , !daemon); This code will attempt to autobox the stop port to an int value but because the stop port is null by default (according to chapter 18.4 of the user guide) it can throw a NPE during autoboxing. As I expected, adding the following line to my build.gradle stopped this NPE from occuring... stopPort = 8081 |
Comments |
Comment by Hans Dockter [ 28/May/09 ] |
This should be fixed now. Could you give it a try? |
Comment by Hans Dockter [ 28/May/09 ] |
BTW: The Jetty plugin is more or less a port of the Maven Jetty plugin. Unfortunately the original code comes without unit test. We haven't come around to adding them yet. |
Comment by Hans Dockter [ 28/May/09 ] |
I have tried it myself. The bug is fixed. Thanks. |
Comment by Shanon McQuay [ 28/May/09 ] |
Fantastic. Thanks for the quick response, keep up the great work! |