mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-19 13:45:48 +00:00
Use java.util.Arrays for cloning byte arrays.
This commit is contained in:
parent
0a54554413
commit
04f9de20d4
@ -24,7 +24,8 @@ import org.slf4j.*;
|
|||||||
|
|
||||||
import javax.annotation.*;
|
import javax.annotation.*;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.*;
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.*;
|
import static com.google.common.base.Preconditions.*;
|
||||||
|
|
||||||
@ -411,7 +412,7 @@ public class TransactionOutput extends ChildMessage {
|
|||||||
|
|
||||||
/** Returns a copy of the output detached from its containing transaction, if need be. */
|
/** Returns a copy of the output detached from its containing transaction, if need be. */
|
||||||
public TransactionOutput duplicateDetached() {
|
public TransactionOutput duplicateDetached() {
|
||||||
return new TransactionOutput(params, null, Coin.valueOf(value), org.spongycastle.util.Arrays.clone(scriptBytes));
|
return new TransactionOutput(params, null, Coin.valueOf(value), Arrays.copyOf(scriptBytes, scriptBytes.length));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -27,9 +27,9 @@ import com.google.common.collect.ImmutableList;
|
|||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.spongycastle.crypto.params.KeyParameter;
|
import org.spongycastle.crypto.params.KeyParameter;
|
||||||
import org.spongycastle.util.Arrays;
|
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.concurrent.atomic.AtomicReference;
|
import java.util.concurrent.atomic.AtomicReference;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user