Skip to content

Commit c685569

Browse files
committed
8297731: Remove redundant check in MutableBigInteger.divide
Reviewed-by: bpb
1 parent dcf431d commit c685569

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/java.base/share/classes/java/math/MutableBigInteger.java

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1999, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1999, 2022, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -1531,13 +1531,10 @@ private MutableBigInteger divideMagnitude(MutableBigInteger div,
15311531
quotient.intLen = limit;
15321532
int[] q = quotient.value;
15331533

1534-
1535-
// Must insert leading 0 in rem if its length did not change
1536-
if (rem.intLen == nlen) {
1537-
rem.offset = 0;
1538-
rem.value[0] = 0;
1539-
rem.intLen++;
1540-
}
1534+
// Insert leading 0 in rem
1535+
rem.offset = 0;
1536+
rem.value[0] = 0;
1537+
rem.intLen++;
15411538

15421539
int dh = divisor[0];
15431540
long dhLong = dh & LONG_MASK;

0 commit comments

Comments
 (0)