brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [2/7] incubator-brooklyn git commit: Fix Winrm4jTool logging on error
Date Fri, 04 Dec 2015 12:48:48 GMT
Fix Winrm4jTool logging on error

Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/4277af16
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/4277af16
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/4277af16

Branch: refs/heads/master
Commit: 4277af169c4a9a9aaa86c2a88f22cf29958888e3
Parents: eafabde
Author: Aled Sage <aled.sage@gmail.com>
Authored: Fri Dec 4 09:57:55 2015 +0000
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Fri Dec 4 09:57:55 2015 +0000

----------------------------------------------------------------------
 .../brooklyn/util/core/internal/winrm/pywinrm/Winrm4jTool.java   | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/4277af16/software/winrm/src/main/java/org/apache/brooklyn/util/core/internal/winrm/pywinrm/Winrm4jTool.java
----------------------------------------------------------------------
diff --git a/software/winrm/src/main/java/org/apache/brooklyn/util/core/internal/winrm/pywinrm/Winrm4jTool.java
b/software/winrm/src/main/java/org/apache/brooklyn/util/core/internal/winrm/pywinrm/Winrm4jTool.java
index 57b0e2b..e1f313d 100644
--- a/software/winrm/src/main/java/org/apache/brooklyn/util/core/internal/winrm/pywinrm/Winrm4jTool.java
+++ b/software/winrm/src/main/java/org/apache/brooklyn/util/core/internal/winrm/pywinrm/Winrm4jTool.java
@@ -25,7 +25,6 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 import java.util.Map;
-import java.util.concurrent.Callable;
 
 import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.core.config.ConfigKeys;
@@ -40,7 +39,6 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.annotations.Beta;
 import com.google.common.base.Function;
-import com.google.common.base.Joiner;
 import com.google.common.base.Stopwatch;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.Lists;
@@ -157,7 +155,7 @@ public class Winrm4jTool implements org.apache.brooklyn.util.core.internal.winrm
                         + ", this attempt failed after "+Duration.of(failTimestamp).toStringRounded()
                         + (connectTimestamp != null ? ", connected in "+Duration.of(connectTimestamp).toStringRounded()
: "");
                 
-                if (i == (execTries+1)) {
+                if ((i + 1) == execTries) {
                     LOG.info("Propagating exception - WinRM failed on "+user+"@"+host+":"+port+"
"
                             + (logCredentials ? "password=" + password : "")
                             + "; (attempt "+(i+1)+" of "+execTries+"; "+timeMsg+")", e);


Mime
View raw message