mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-07-31 20:11:23 +00:00
AddressTest: Fix cast.
This commit is contained in:
@@ -43,15 +43,15 @@ public class AddressTest {
|
||||
Address testAddress = Address.fromBase58(testParams, "n4eA2nbYqErp7H6jebchxAN59DmNpksexv");
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream();
|
||||
new ObjectOutputStream(os).writeObject(testAddress);
|
||||
VersionedChecksummedBytes testAddressCopy = (VersionedChecksummedBytes) new ObjectInputStream(
|
||||
new ByteArrayInputStream(os.toByteArray())).readObject();
|
||||
Address testAddressCopy = (Address) new ObjectInputStream(new ByteArrayInputStream(os.toByteArray()))
|
||||
.readObject();
|
||||
assertEquals(testAddress, testAddressCopy);
|
||||
|
||||
Address mainAddress = Address.fromBase58(mainParams, "17kzeh4N8g49GFvdDzSf8PjaPfyoD1MndL");
|
||||
os = new ByteArrayOutputStream();
|
||||
new ObjectOutputStream(os).writeObject(mainAddress);
|
||||
VersionedChecksummedBytes mainAddressCopy = (VersionedChecksummedBytes) new ObjectInputStream(
|
||||
new ByteArrayInputStream(os.toByteArray())).readObject();
|
||||
Address mainAddressCopy = (Address) new ObjectInputStream(new ByteArrayInputStream(os.toByteArray()))
|
||||
.readObject();
|
||||
assertEquals(mainAddress, mainAddressCopy);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user