You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by er...@apache.org on 2019/08/08 17:30:34 UTC
[commons-numbers] 11/18: NUMBERS-120: Satisfy checkstyle
requirements
This is an automated email from the ASF dual-hosted git repository.
erans pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-numbers.git
commit 1abb1d8c1d57ce497b30e7145eb3499143f0f79e
Author: Schamschi <he...@gmx.at>
AuthorDate: Mon Jul 1 16:55:21 2019 +0200
NUMBERS-120: Satisfy checkstyle requirements
---
.../java/org/apache/commons/numbers/fraction/BigFraction.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/BigFraction.java b/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/BigFraction.java
index 3487dda..7737228 100644
--- a/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/BigFraction.java
+++ b/commons-numbers-fraction/src/main/java/org/apache/commons/numbers/fraction/BigFraction.java
@@ -837,10 +837,10 @@ public class BigFraction extends Number implements Comparable<BigFraction>, Seri
throw new IllegalArgumentException();
}
boolean roundUp = false;
- if (value.testBit(bits - 1)
- && (hasFractionalBits
- || (value.getLowestSetBit() < bits - 1)
- || value.testBit(bits))) {
+ if (value.testBit(bits - 1) &&
+ (hasFractionalBits ||
+ (value.getLowestSetBit() < bits - 1) ||
+ value.testBit(bits))) {
roundUp = true;
}
BigInteger result = value.shiftRight(bits);