mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8258915: Temporary buffer cleanup
Reviewed-by: valeriep
This commit is contained in:
parent
31d8a19e47
commit
f834557ae0
79 changed files with 1517 additions and 1039 deletions
|
@ -159,8 +159,14 @@ class MutableBigInteger {
|
|||
* supposed to modify the returned array.
|
||||
*/
|
||||
private int[] getMagnitudeArray() {
|
||||
if (offset > 0 || value.length != intLen)
|
||||
return Arrays.copyOfRange(value, offset, offset + intLen);
|
||||
if (offset > 0 || value.length != intLen) {
|
||||
// Shrink value to be the total magnitude
|
||||
int[] tmp = Arrays.copyOfRange(value, offset, offset + intLen);
|
||||
Arrays.fill(value, 0);
|
||||
offset = 0;
|
||||
intLen = tmp.length;
|
||||
value = tmp;
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue