Github user aledsage commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/145#discussion_r63859115
--- Diff:
software/base/src/main/java/org/apache/brooklyn/entity/software/base/VanillaWindowsProcessWinRmDriver.java
---
@@ -80,9 +84,22 @@ public void launch() {
@Override
public boolean isRunning() {
- int exitCode = executeCommandInTask(
-
getEntity().getConfig(VanillaWindowsProcess.CHECK_RUNNING_COMMAND),
-
getEntity().getConfig(VanillaWindowsProcess.CHECK_RUNNING_POWERSHELL_COMMAND),
"is-running-command");
+ int exitCode = 1;
--- End diff --
Very minor (for next time). I wouldn't bother giving this an initial value.
It will always get a value inside the try-block, and the catch block will
always either return or throw. So the initial value of `1` will always get
overwritten. Better to be explicit about that by not giving it any initial
value.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---