Skip to content
This repository has been archived by the owner on Sep 26, 2019. It is now read-only.

Commit

Permalink
[PAN-2576] Allow whitespace in path (#1327)
Browse files Browse the repository at this point in the history
* [PAN-2576] Allow whitespace in path

- handle whitespace in path
- handle parentheses in path

fixes PAN-2576

* Update SECP256K1Test.java

* Update GenesisConfigFile.java

* Revert "Update GenesisConfigFile.java"

This reverts commit 08bedbf.
  • Loading branch information
AbdelStark committed Apr 24, 2019
1 parent ac53e3d commit 6e77605
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,10 @@

import java.io.File;
import java.math.BigInteger;
import java.net.URL;
import java.nio.file.Files;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.google.common.io.Resources;
import org.junit.BeforeClass;
import org.junit.Test;

Expand Down Expand Up @@ -247,8 +245,11 @@ public void signatureVerification() {

@Test
public void fileContainsValidPrivateKey() throws Exception {
final URL url = Resources.getResource("tech/pegasys/pantheon/crypto/validPrivateKey.txt");
final File file = new File(url.getFile());
final File file =
new File(
this.getClass()
.getResource("/tech/pegasys/pantheon/crypto/validPrivateKey.txt")
.toURI());
final SECP256K1.PrivateKey privateKey = SECP256K1.PrivateKey.load(file);
assertEquals(
BytesValue.fromHexString(
Expand Down

0 comments on commit 6e77605

Please sign in to comment.