-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix timeout cast exception #685
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we check that it is a long before calling Long.valueOf()
? We have code in DevTask that checks isInteger()
before calling toInteger()
on the server.timeout
.
Updated: Now that I look at the String documentation, I don't even see an isInteger()
or toInteger()
method and I think DevTask would get a failure at line 927:
if (server.timeout != null && server.timeout.isInteger()) { |
Still want me to add a check for that? Or should we just let it fail on bad plugin config? |
@@ -925,7 +925,12 @@ class DevTask extends AbstractFeatureTask { | |||
|
|||
if (serverStartTimeout == null) { | |||
if (server.timeout != null && server.timeout.isInteger()) { | |||
serverStartTimeout = server.timeout.toInteger(); | |||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't believe isInteger()
is valid on the line before this either. Probably should just check that the string is notEmpty().
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, missed that. Fixed it.
* Fix timeout cast exception * Catch NumberFormatException for bad long value * Update error message * Update server parameter casts in DevTask * Check for empty server.timeout value
Fixes #684