You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by kn...@apache.org on 2015/11/23 22:08:14 UTC

[35/37] storm git commit: Fixing nits.

Fixing nits.


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/e7a8c94c
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/e7a8c94c
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/e7a8c94c

Branch: refs/heads/master
Commit: e7a8c94c94d22337dacc65de8ccd6b18809bec63
Parents: 9bfb26c
Author: Kyle Nusbaum <Ky...@gmail.com>
Authored: Mon Nov 23 14:38:32 2015 -0600
Committer: Kyle Nusbaum <Ky...@gmail.com>
Committed: Mon Nov 23 14:38:32 2015 -0600

----------------------------------------------------------------------
 storm-core/src/clj/backtype/storm/util.clj                   | 2 +-
 .../src/jvm/backtype/storm/security/auth/AuthUtils.java      | 8 +++-----
 2 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/e7a8c94c/storm-core/src/clj/backtype/storm/util.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/backtype/storm/util.clj b/storm-core/src/clj/backtype/storm/util.clj
index 0fab3e7..8835572 100644
--- a/storm-core/src/clj/backtype/storm/util.clj
+++ b/storm-core/src/clj/backtype/storm/util.clj
@@ -1067,7 +1067,7 @@
   [retries task-description f & args]
   (let [res (try {:value (apply f args)}
               (catch Exception e
-                (if (= 0 retries)
+                (if (<= 0 retries)
                   (throw e)
                   {:exception e})))]
     (if (:exception res)

http://git-wip-us.apache.org/repos/asf/storm/blob/e7a8c94c/storm-core/src/jvm/backtype/storm/security/auth/AuthUtils.java
----------------------------------------------------------------------
diff --git a/storm-core/src/jvm/backtype/storm/security/auth/AuthUtils.java b/storm-core/src/jvm/backtype/storm/security/auth/AuthUtils.java
index 429c712..6f6969e 100644
--- a/storm-core/src/jvm/backtype/storm/security/auth/AuthUtils.java
+++ b/storm-core/src/jvm/backtype/storm/security/auth/AuthUtils.java
@@ -323,8 +323,7 @@ public class AuthUtils {
             Map<String, ?> results = AuthUtils.PullConfig(login_config, config_section);
             username = (String)results.get(USERNAME);
             password = (String)results.get(PASSWORD);
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             LOG.error("Failed to pull username/password out of jaas conf", e);
         }
 
@@ -338,11 +337,10 @@ public class AuthUtils {
 
             StringBuilder builder = new StringBuilder();
             for(byte b : output) {
-            builder.append(String.format("%02x", b));
+                builder.append(String.format("%02x", b));
             }
             return builder.toString();
-        }
-        catch(java.security.NoSuchAlgorithmException e) {
+        } catch (java.security.NoSuchAlgorithmException e) {
             LOG.error("Cant run SHA-512 digest. Algorithm not available.", e);
             throw new RuntimeException(e);
         }