ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [07/12] ignite git commit: ignite-gg-12163 utils update
Date Mon, 29 May 2017 07:56:34 GMT
ignite-gg-12163 utils update


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

Branch: refs/heads/ignite-5075-pds
Commit: 13c5a5f37a448c5fde66538ff522ff2582db6146
Parents: 874096f
Author: Dmitriy Govorukhin <dmitriy.govorukhin@gmail.com>
Authored: Fri May 26 12:02:37 2017 +0300
Committer: Dmitriy Govorukhin <dmitriy.govorukhin@gmail.com>
Committed: Fri May 26 12:02:37 2017 +0300

----------------------------------------------------------------------
 .../java/org/apache/ignite/internal/util/IgniteUtils.java    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ignite/blob/13c5a5f3/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
----------------------------------------------------------------------
diff --git a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
index 90de683..ba4717a 100755
--- a/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
+++ b/modules/core/src/main/java/org/apache/ignite/internal/util/IgniteUtils.java
@@ -10199,11 +10199,11 @@ public abstract class IgniteUtils {
     public static int nearestPow2(int x, boolean less) {
         assert x > 0 : "can not calculate for less zero";
 
-        int y = 1;
+        long y = 1;
 
         while (y < x){
-            if ((long)y * 2 > Integer.MAX_VALUE)
-                return y;
+            if (y * 2 > Integer.MAX_VALUE)
+                return (int)y;
 
             y *= 2;
         }
@@ -10211,7 +10211,7 @@ public abstract class IgniteUtils {
         if (less)
             y /= 2;
 
-        return y;
+        return (int)y;
     }
 
     /**


Mime
View raw message