Open yurelle opened 6 years ago
Looks like you are right. Would you be interested in providing a pull request?
Thank you, but I don't have access to the code base right now. You can take the credit. :-)
-Yurelle
On Sat, Apr 14, 2018 at 1:35 PM, Benjamin Muschko notifications@github.com wrote:
Looks like you are right. Would you be interested in providing a pull request?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bmuschko/gradle-tomcat-plugin/issues/174#issuecomment-381346228, or mute the thread https://github.com/notifications/unsubscribe-auth/AWoRsdqtIlrbsVG3N61Fhh6sW1KyPIpsks5tojN7gaJpZM4SK9-1 .
@yurelle Just as a heads up: I am asking because I won't have the time to look into it soon. If you have an urgent need for the bug to be fixed then you'll need to provide a pull request.
https://github.com/bmuschko/gradle-tomcat-plugin/blob/c103bf4706d58f6c144d1e123bf884ab0adc3a46/plugin/src/main/groovy/com/bmuschko/gradle/tomcat/tasks/TomcatRun.groovy#L116
This function always returns false. Several years ago, this code was refactored to add the if condition (in this commit; line: [old]-97 [new]-111). In the original code, the
webXml.exists()
was the last line of the function, and thus acted as a return value. However, once moved to inside an if-block, this auto return no longer works. Thus, this function always returns false. A manual return needs to be added to this line.Fix:
return webXml.exists()