From db55c527c651643649cf55acda6ef5c143d0a664 Mon Sep 17 00:00:00 2001 From: shubham gupta Date: Fri, 9 Feb 2024 10:51:49 +0530 Subject: [PATCH] logical and fix in mathUtils (#102) --- pkl-core/src/main/java/org/pkl/core/util/MathUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkl-core/src/main/java/org/pkl/core/util/MathUtils.java b/pkl-core/src/main/java/org/pkl/core/util/MathUtils.java index 9f2e7f09..05b5cac4 100644 --- a/pkl-core/src/main/java/org/pkl/core/util/MathUtils.java +++ b/pkl-core/src/main/java/org/pkl/core/util/MathUtils.java @@ -63,7 +63,7 @@ public final strictfp class MathUtils { * Long.bitCount(Long.MIN_VALUE) == 1}, but {@link Long#MIN_VALUE} is not a power of two. */ public static boolean isPowerOfTwo(long x) { - return x > 0 & (x & (x - 1)) == 0; + return x > 0 && (x & (x - 1)) == 0; } /**