Skip to content
This repository was archived by the owner on Jan 18, 2022. It is now read-only.

Commit 2c5d421

Browse files
author
buchholz
committed
Simplify zero check
1 parent 7a285fe commit 2c5d421

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/main/java/org/javamoney/moneta/FastMoney.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,7 @@ public FastMoney multiply(Number multiplicand) {
450450
}
451451

452452
private long multiplyExact(long num1, long num2) {
453-
if(num1==0){
454-
return 0;
455-
}
456-
if(num2==0){
453+
if(num1==0 || num2==0){
457454
return 0;
458455
}
459456
boolean pos = num1>0 && num2 >0;

0 commit comments

Comments
 (0)