diff --git a/.travis.yml b/.travis.yml
index 3f1c60c652f..e398b0a9bc1 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,5 +1,5 @@
language: java
-jdk: oraclejdk8
+jdk: oraclejdk10
before_install:
grep -v '^#' src/main/resources/META-INF/services/bisq.asset.Asset | sort --check --dictionary-order --ignore-case
notifications:
diff --git a/assets/build.gradle b/assets/build.gradle
index a2dd32af13b..28f6fc9940c 100644
--- a/assets/build.gradle
+++ b/assets/build.gradle
@@ -6,7 +6,7 @@ plugins {
group 'network.bisq'
version '-SNAPSHOT'
-sourceCompatibility = 1.8
+sourceCompatibility = 1.10
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
diff --git a/common/build.gradle b/common/build.gradle
index 18c400eb5eb..9fe1ab739a3 100644
--- a/common/build.gradle
+++ b/common/build.gradle
@@ -11,7 +11,7 @@ ext {
protobufVersion = '3.5.1'
}
-sourceCompatibility = 1.8
+sourceCompatibility = 1.10
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
@@ -56,7 +56,7 @@ dependencies {
compile 'org.bouncycastle:bcpg-jdk15on:1.56'
compile 'commons-io:commons-io:2.4'
compile 'org.apache.commons:commons-lang3:3.4'
- compileOnly 'org.projectlombok:lombok:1.16.16'
- annotationProcessor 'org.projectlombok:lombok:1.16.16'
+ compileOnly 'org.projectlombok:lombok:1.18.2'
+ annotationProcessor 'org.projectlombok:lombok:1.18.2'
testCompile 'junit:junit:4.12'
}
diff --git a/common/src/main/java/bisq/common/crypto/Encryption.java b/common/src/main/java/bisq/common/crypto/Encryption.java
index bfa3adf0203..a04ea2df34c 100644
--- a/common/src/main/java/bisq/common/crypto/Encryption.java
+++ b/common/src/main/java/bisq/common/crypto/Encryption.java
@@ -25,6 +25,8 @@
import javax.crypto.KeyGenerator;
import javax.crypto.Mac;
import javax.crypto.SecretKey;
+import javax.crypto.spec.OAEPParameterSpec;
+import javax.crypto.spec.PSource;
import javax.crypto.spec.SecretKeySpec;
import java.security.InvalidKeyException;
@@ -36,6 +38,7 @@
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.InvalidKeySpecException;
+import java.security.spec.MGF1ParameterSpec;
import java.security.spec.X509EncodedKeySpec;
import java.io.ByteArrayOutputStream;
@@ -51,7 +54,7 @@ public class Encryption {
private static final Logger log = LoggerFactory.getLogger(Encryption.class);
public static final String ASYM_KEY_ALGO = "RSA";
- private static final String ASYM_CIPHER = "RSA/None/OAEPWithSHA256AndMGF1Padding";
+ private static final String ASYM_CIPHER = "RSA/ECB/OAEPWithSHA-256AndMGF1PADDING";
private static final String SYM_KEY_ALGO = "AES";
private static final String SYM_CIPHER = "AES";
@@ -61,7 +64,7 @@ public class Encryption {
public static KeyPair generateKeyPair() {
long ts = System.currentTimeMillis();
try {
- KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(ASYM_KEY_ALGO, "BC");
+ KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(ASYM_KEY_ALGO);
keyPairGenerator.initialize(2048);
KeyPair keyPair = keyPairGenerator.genKeyPair();
log.trace("Generate msgEncryptionKeyPair needed {} ms", System.currentTimeMillis() - ts);
@@ -80,7 +83,7 @@ public static KeyPair generateKeyPair() {
public static byte[] encrypt(byte[] payload, SecretKey secretKey) throws CryptoException {
try {
- Cipher cipher = Cipher.getInstance(SYM_CIPHER, "BC");
+ Cipher cipher = Cipher.getInstance(SYM_CIPHER);
cipher.init(Cipher.ENCRYPT_MODE, secretKey);
return cipher.doFinal(payload);
} catch (Throwable e) {
@@ -91,7 +94,7 @@ public static byte[] encrypt(byte[] payload, SecretKey secretKey) throws CryptoE
public static byte[] decrypt(byte[] encryptedPayload, SecretKey secretKey) throws CryptoException {
try {
- Cipher cipher = Cipher.getInstance(SYM_CIPHER, "BC");
+ Cipher cipher = Cipher.getInstance(SYM_CIPHER);
cipher.init(Cipher.DECRYPT_MODE, secretKey);
return cipher.doFinal(encryptedPayload);
} catch (Throwable e) {
@@ -157,7 +160,7 @@ private static boolean verifyHmac(byte[] message, byte[] hmac, SecretKey secretK
}
private static byte[] getHmac(byte[] payload, SecretKey secretKey) throws NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException {
- Mac mac = Mac.getInstance(HMAC, "BC");
+ Mac mac = Mac.getInstance(HMAC);
mac.init(secretKey);
return mac.doFinal(payload);
}
@@ -195,8 +198,10 @@ public static byte[] decryptPayloadWithHmac(byte[] encryptedPayloadWithHmac, Sec
public static byte[] encryptSecretKey(SecretKey secretKey, PublicKey publicKey) throws CryptoException {
try {
- Cipher cipher = Cipher.getInstance(ASYM_CIPHER, "BC");
- cipher.init(Cipher.WRAP_MODE, publicKey);
+ Cipher cipher = Cipher.getInstance(ASYM_CIPHER);
+ OAEPParameterSpec oaepParameterSpec = new OAEPParameterSpec("SHA-256", "MGF1",
+ MGF1ParameterSpec.SHA256, PSource.PSpecified.DEFAULT);
+ cipher.init(Cipher.WRAP_MODE, publicKey, oaepParameterSpec);
return cipher.wrap(secretKey);
} catch (Throwable e) {
e.printStackTrace();
@@ -206,8 +211,10 @@ public static byte[] encryptSecretKey(SecretKey secretKey, PublicKey publicKey)
public static SecretKey decryptSecretKey(byte[] encryptedSecretKey, PrivateKey privateKey) throws CryptoException {
try {
- Cipher cipher = Cipher.getInstance(ASYM_CIPHER, "BC");
- cipher.init(Cipher.UNWRAP_MODE, privateKey);
+ Cipher cipher = Cipher.getInstance(ASYM_CIPHER);
+ OAEPParameterSpec oaepParameterSpec = new OAEPParameterSpec("SHA-256", "MGF1",
+ MGF1ParameterSpec.SHA256, PSource.PSpecified.DEFAULT);
+ cipher.init(Cipher.UNWRAP_MODE, privateKey, oaepParameterSpec);
return (SecretKey) cipher.unwrap(encryptedSecretKey, "AES", Cipher.SECRET_KEY);
} catch (Throwable e) {
// errors when trying to decrypt foreign network_messages are normal
@@ -222,7 +229,7 @@ public static SecretKey decryptSecretKey(byte[] encryptedSecretKey, PrivateKey p
public static SecretKey generateSecretKey(int bits) {
try {
- KeyGenerator keyPairGenerator = KeyGenerator.getInstance(SYM_KEY_ALGO, "BC");
+ KeyGenerator keyPairGenerator = KeyGenerator.getInstance(SYM_KEY_ALGO);
keyPairGenerator.init(bits);
return keyPairGenerator.generateKey();
} catch (Throwable e) {
@@ -242,8 +249,8 @@ public static byte[] getPublicKeyBytes(PublicKey encryptionPubKey) {
*/
public static PublicKey getPublicKeyFromBytes(byte[] encryptionPubKeyBytes) {
try {
- return KeyFactory.getInstance(Encryption.ASYM_KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(encryptionPubKeyBytes));
- } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchProviderException e) {
+ return KeyFactory.getInstance(Encryption.ASYM_KEY_ALGO).generatePublic(new X509EncodedKeySpec(encryptionPubKeyBytes));
+ } catch (InvalidKeySpecException | NoSuchAlgorithmException e) {
log.error("Error creating sigPublicKey from bytes. sigPublicKeyBytes as hex={}, error={}", Utilities.bytesAsHexString(encryptionPubKeyBytes), e);
e.printStackTrace();
throw new KeyConversionException(e);
diff --git a/common/src/main/java/bisq/common/crypto/Hash.java b/common/src/main/java/bisq/common/crypto/Hash.java
index 820d8a1aa62..078582266a9 100644
--- a/common/src/main/java/bisq/common/crypto/Hash.java
+++ b/common/src/main/java/bisq/common/crypto/Hash.java
@@ -25,7 +25,6 @@
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
import java.nio.ByteBuffer;
@@ -40,10 +39,10 @@ public class Hash {
*/
public static byte[] getSha256Hash(byte[] data) {
try {
- MessageDigest digest = MessageDigest.getInstance("SHA-256", "BC");
+ MessageDigest digest = MessageDigest.getInstance("SHA-256");
digest.update(data, 0, data.length);
return digest.digest();
- } catch (NoSuchAlgorithmException | NoSuchProviderException e) {
+ } catch (NoSuchAlgorithmException e) {
log.error("Could not create MessageDigest for hash. " + e.toString());
e.printStackTrace();
throw new RuntimeException(e);
diff --git a/common/src/main/java/bisq/common/crypto/KeyStorage.java b/common/src/main/java/bisq/common/crypto/KeyStorage.java
index 1320cf36ecb..1b1f00525da 100644
--- a/common/src/main/java/bisq/common/crypto/KeyStorage.java
+++ b/common/src/main/java/bisq/common/crypto/KeyStorage.java
@@ -28,7 +28,6 @@
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.interfaces.DSAParams;
@@ -121,7 +120,7 @@ public KeyPair loadKeyPair(KeyEntry keyEntry) {
FileUtil.rollingBackup(storageDir, keyEntry.getFileName() + ".key", 20);
// long now = System.currentTimeMillis();
try {
- KeyFactory keyFactory = KeyFactory.getInstance(keyEntry.getAlgorithm(), "BC");
+ KeyFactory keyFactory = KeyFactory.getInstance(keyEntry.getAlgorithm());
PublicKey publicKey;
PrivateKey privateKey;
@@ -158,7 +157,7 @@ public KeyPair loadKeyPair(KeyEntry keyEntry) {
log.debug("load completed in {} msec", System.currentTimeMillis() - new Date().getTime());
return new KeyPair(publicKey, privateKey);
- } catch (NoSuchAlgorithmException | InvalidKeySpecException | NoSuchProviderException e) {
+ } catch (NoSuchAlgorithmException | InvalidKeySpecException e) {
e.printStackTrace();
log.error(e.getMessage());
throw new RuntimeException("Could not load key " + keyEntry.toString(), e);
diff --git a/common/src/main/java/bisq/common/crypto/Sig.java b/common/src/main/java/bisq/common/crypto/Sig.java
index 6917bb9df0a..85e14838967 100644
--- a/common/src/main/java/bisq/common/crypto/Sig.java
+++ b/common/src/main/java/bisq/common/crypto/Sig.java
@@ -28,7 +28,6 @@
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.NoSuchAlgorithmException;
-import java.security.NoSuchProviderException;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.Signature;
@@ -60,12 +59,12 @@ public class Sig {
public static KeyPair generateKeyPair() {
long ts = System.currentTimeMillis();
try {
- KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(KEY_ALGO, "BC");
+ KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance(KEY_ALGO);
keyPairGenerator.initialize(1024);
KeyPair keyPair = keyPairGenerator.genKeyPair();
log.trace("Generate msgSignatureKeyPair needed {} ms", System.currentTimeMillis() - ts);
return keyPair;
- } catch (NoSuchAlgorithmException | NoSuchProviderException e) {
+ } catch (NoSuchAlgorithmException e) {
e.printStackTrace();
log.error(e.toString());
throw new RuntimeException("Could not create key.");
@@ -80,11 +79,11 @@ public static KeyPair generateKeyPair() {
*/
public static byte[] sign(PrivateKey privateKey, byte[] data) throws CryptoException {
try {
- Signature sig = Signature.getInstance(ALGO, "BC");
+ Signature sig = Signature.getInstance(ALGO);
sig.initSign(privateKey);
sig.update(data);
return sig.sign();
- } catch (SignatureException | NoSuchProviderException | InvalidKeyException | NoSuchAlgorithmException e) {
+ } catch (SignatureException | InvalidKeyException | NoSuchAlgorithmException e) {
throw new CryptoException("Signing failed. " + e.getMessage());
}
}
@@ -107,11 +106,11 @@ public static String sign(PrivateKey privateKey, String message) throws CryptoEx
*/
public static boolean verify(PublicKey publicKey, byte[] data, byte[] signature) throws CryptoException {
try {
- Signature sig = Signature.getInstance(ALGO, "BC");
+ Signature sig = Signature.getInstance(ALGO);
sig.initVerify(publicKey);
sig.update(data);
return sig.verify(signature);
- } catch (SignatureException | NoSuchProviderException | InvalidKeyException | NoSuchAlgorithmException e) {
+ } catch (SignatureException | InvalidKeyException | NoSuchAlgorithmException e) {
throw new CryptoException("Signature verification failed. " + e.getMessage());
}
}
@@ -132,8 +131,8 @@ public static boolean verify(PublicKey publicKey, String message, String signatu
*/
public static PublicKey getPublicKeyFromBytes(byte[] sigPublicKeyBytes) {
try {
- return KeyFactory.getInstance(Sig.KEY_ALGO, "BC").generatePublic(new X509EncodedKeySpec(sigPublicKeyBytes));
- } catch (InvalidKeySpecException | NoSuchAlgorithmException | NoSuchProviderException e) {
+ return KeyFactory.getInstance(Sig.KEY_ALGO).generatePublic(new X509EncodedKeySpec(sigPublicKeyBytes));
+ } catch (InvalidKeySpecException | NoSuchAlgorithmException e) {
log.error("Error creating sigPublicKey from bytes. sigPublicKeyBytes as hex={}, error={}", Utilities.bytesAsHexString(sigPublicKeyBytes), e);
e.printStackTrace();
throw new KeyConversionException(e);
diff --git a/common/src/main/java/bisq/common/setup/CommonSetup.java b/common/src/main/java/bisq/common/setup/CommonSetup.java
index 6e934cdd54e..c170c194c6e 100644
--- a/common/src/main/java/bisq/common/setup/CommonSetup.java
+++ b/common/src/main/java/bisq/common/setup/CommonSetup.java
@@ -25,10 +25,7 @@
import org.apache.commons.lang3.exception.ExceptionUtils;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
import java.security.NoSuchAlgorithmException;
-import java.security.Security;
import lombok.extern.slf4j.Slf4j;
@@ -38,8 +35,6 @@ public class CommonSetup {
public static void setup(UncaughtExceptionHandler uncaughtExceptionHandler) {
setupErrorHandler(uncaughtExceptionHandler);
- Security.addProvider(new BouncyCastleProvider());
-
if (Utilities.isLinux())
System.setProperty("prism.lcdtext", "false");
}
diff --git a/core/build.gradle b/core/build.gradle
index 7e93918d623..3c1c180bf24 100644
--- a/core/build.gradle
+++ b/core/build.gradle
@@ -6,12 +6,14 @@ plugins {
group = 'network.bisq'
version = '-SNAPSHOT'
-sourceCompatibility = 1.8
+sourceCompatibility = 1.10
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
+def jmockitVersion = '1.42'
+
repositories {
jcenter()
maven { url 'https://jitpack.io' }
@@ -43,18 +45,29 @@ dependencies {
compile('com.fasterxml.jackson.core:jackson-databind:2.8.10') {
exclude(module: 'jackson-annotations')
}
- compileOnly 'org.projectlombok:lombok:1.16.16'
- annotationProcessor 'org.projectlombok:lombok:1.16.16'
+ compileOnly 'org.projectlombok:lombok:1.18.2'
+ annotationProcessor 'org.projectlombok:lombok:1.18.2'
+
+ testCompile "org.jmockit:jmockit:$jmockitVersion"
testCompile 'junit:junit:4.12'
- testCompile('org.mockito:mockito-core:2.8.9') {
+ testCompile('org.mockito:mockito-core:2.21.0') {
exclude(module: 'objenesis')
}
- testCompile 'org.powermock:powermock-module-junit4:1.7.1'
- testCompile 'org.powermock:powermock-api-mockito2:1.7.1'
- testCompile 'org.jmockit:jmockit:1.30'
+ testCompile 'org.powermock:powermock-module-junit4:2.0.0-beta.5'
+ testCompile 'org.powermock:powermock-api-mockito2:2.0.0-beta.5'
+
+
testCompile 'org.springframework:spring-test:4.3.6.RELEASE'
testCompile 'com.natpryce:make-it-easy:4.0.1'
testCompile group: 'org.hamcrest', name: 'hamcrest-all', version: '1.3'
- testCompileOnly 'org.projectlombok:lombok:1.16.16'
- testAnnotationProcessor 'org.projectlombok:lombok:1.16.16'
+ testCompileOnly 'org.projectlombok:lombok:1.18.2'
+ testAnnotationProcessor 'org.projectlombok:lombok:1.18.2'
}
+
+test {
+ systemProperty 'jdk.attach.allowAttachSelf', true
+
+ def jmockit = configurations.testCompile.files.find { it.name.contains("jmockit") }.absolutePath
+ jvmArgs "-javaagent:$jmockit"
+}
+
diff --git a/core/src/main/java/bisq/core/app/BisqSetup.java b/core/src/main/java/bisq/core/app/BisqSetup.java
index 12dd7750788..1fbb63757d2 100644
--- a/core/src/main/java/bisq/core/app/BisqSetup.java
+++ b/core/src/main/java/bisq/core/app/BisqSetup.java
@@ -444,9 +444,6 @@ private void checkCryptoSetup() {
((Ping) tuple.getNetworkEnvelope()).getNonce() == payload.getNonce() &&
((Ping) tuple.getNetworkEnvelope()).getLastRoundTripTime() == payload.getLastRoundTripTime()) {
log.debug("Crypto test succeeded");
-
- if (Security.getProvider("BC") == null)
- throw new CryptoException("Security provider BountyCastle is not available.");
} else {
throw new CryptoException("Payload not correct after decryption");
}
diff --git a/core/src/main/java/bisq/core/app/SetupUtils.java b/core/src/main/java/bisq/core/app/SetupUtils.java
index 779228bc82b..c7cf8cafa3c 100644
--- a/core/src/main/java/bisq/core/app/SetupUtils.java
+++ b/core/src/main/java/bisq/core/app/SetupUtils.java
@@ -34,8 +34,6 @@
import javafx.beans.property.BooleanProperty;
import javafx.beans.property.SimpleBooleanProperty;
-import java.security.Security;
-
import java.util.Date;
import java.util.function.Consumer;
@@ -68,11 +66,7 @@ public void run() {
((Ping) tuple.getNetworkEnvelope()).getLastRoundTripTime() == payload.getLastRoundTripTime()) {
log.debug("Crypto test succeeded");
- if (Security.getProvider("BC") != null) {
- UserThread.execute(resultHandler::handleResult);
- } else {
- errorHandler.accept(new CryptoException("Security provider BountyCastle is not available."));
- }
+ UserThread.execute(resultHandler::handleResult);
} else {
errorHandler.accept(new CryptoException("Payload not correct after decryption"));
}
diff --git a/core/src/test/java/bisq/core/arbitration/ArbitratorManagerTest.java b/core/src/test/java/bisq/core/arbitration/ArbitratorManagerTest.java
index ff45952e14c..a5ae6a713fc 100644
--- a/core/src/test/java/bisq/core/arbitration/ArbitratorManagerTest.java
+++ b/core/src/test/java/bisq/core/arbitration/ArbitratorManagerTest.java
@@ -27,6 +27,7 @@
import java.util.ArrayList;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -43,12 +44,10 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({User.class, ArbitratorService.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class ArbitratorManagerTest {
- @Before
- public void setUp() {
- Security.addProvider(new BouncyCastleProvider());
- }
+
@Test
public void testIsArbitratorAvailableForLanguage() {
diff --git a/core/src/test/java/bisq/core/btc/wallet/WalletSetupPreferencesTest.java b/core/src/test/java/bisq/core/btc/wallet/WalletSetupPreferencesTest.java
index 2c7317fd076..32cd0c2db95 100644
--- a/core/src/test/java/bisq/core/btc/wallet/WalletSetupPreferencesTest.java
+++ b/core/src/test/java/bisq/core/btc/wallet/WalletSetupPreferencesTest.java
@@ -23,6 +23,7 @@
import java.util.List;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -38,6 +39,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest(Preferences.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class WalletSetupPreferencesTest {
@Test
public void testSelectPreferredNodesWhenPublicOption() {
diff --git a/core/src/test/java/bisq/core/crypto/EncryptionTest.java b/core/src/test/java/bisq/core/crypto/EncryptionTest.java
index 42859aca124..e06ef082754 100644
--- a/core/src/test/java/bisq/core/crypto/EncryptionTest.java
+++ b/core/src/test/java/bisq/core/crypto/EncryptionTest.java
@@ -45,7 +45,7 @@ public class EncryptionTest {
@Before
public void setup() throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException, CryptoException {
- Security.addProvider(new BouncyCastleProvider());
+
dir = File.createTempFile("temp_tests", "");
//noinspection ResultOfMethodCallIgnored
dir.delete();
diff --git a/core/src/test/java/bisq/core/crypto/SigTest.java b/core/src/test/java/bisq/core/crypto/SigTest.java
index 349987f7469..5be2dcb61b1 100644
--- a/core/src/test/java/bisq/core/crypto/SigTest.java
+++ b/core/src/test/java/bisq/core/crypto/SigTest.java
@@ -23,13 +23,6 @@
import bisq.common.crypto.Sig;
import bisq.common.storage.FileUtil;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-import java.security.KeyStoreException;
-import java.security.NoSuchAlgorithmException;
-import java.security.Security;
-import java.security.cert.CertificateException;
-
import java.io.File;
import java.io.IOException;
@@ -50,8 +43,8 @@ public class SigTest {
private File dir;
@Before
- public void setup() throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException, CryptoException {
- Security.addProvider(new BouncyCastleProvider());
+ public void setup() throws IOException {
+
dir = File.createTempFile("temp_tests", "");
//noinspection ResultOfMethodCallIgnored
dir.delete();
diff --git a/core/src/test/java/bisq/core/dao/node/full/BlockParserTest.java b/core/src/test/java/bisq/core/dao/node/full/BlockParserTest.java
index 6c2b9f8c7d8..51a1d087936 100644
--- a/core/src/test/java/bisq/core/dao/node/full/BlockParserTest.java
+++ b/core/src/test/java/bisq/core/dao/node/full/BlockParserTest.java
@@ -49,7 +49,6 @@
import mockit.Expectations;
import mockit.Injectable;
import mockit.Tested;
-import mockit.integration.junit4.JMockit;
import org.junit.Ignore;
import org.junit.Test;
@@ -62,7 +61,6 @@
// Intro to jmockit can be found at http://jmockit.github.io/tutorial/Mocking.html
@Ignore
-@RunWith(JMockit.class)
public class BlockParserTest {
// @Tested classes are instantiated automatically when needed in a test case,
// using injection where possible, see http://jmockit.github.io/tutorial/Mocking.html#tested
diff --git a/core/src/test/java/bisq/core/dao/state/SnapshotManagerTest.java b/core/src/test/java/bisq/core/dao/state/SnapshotManagerTest.java
index 697cae5dd30..a1ab7f3ccf4 100644
--- a/core/src/test/java/bisq/core/dao/state/SnapshotManagerTest.java
+++ b/core/src/test/java/bisq/core/dao/state/SnapshotManagerTest.java
@@ -21,6 +21,7 @@
import java.io.File;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -35,6 +36,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({BsqState.class, BsqStateService.class, PersistenceProtoResolver.class, File.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class SnapshotManagerTest {
private SnapshotManager snapshotManager;
diff --git a/core/src/test/java/bisq/core/network/p2p/seed/SeedNodeAddressLookupTest.java b/core/src/test/java/bisq/core/network/p2p/seed/SeedNodeAddressLookupTest.java
index ca76150f594..8f63daefd82 100644
--- a/core/src/test/java/bisq/core/network/p2p/seed/SeedNodeAddressLookupTest.java
+++ b/core/src/test/java/bisq/core/network/p2p/seed/SeedNodeAddressLookupTest.java
@@ -36,10 +36,7 @@
import static org.mockito.Mockito.mock;
public class SeedNodeAddressLookupTest {
- @Before
- public void setUp() {
- Security.addProvider(new BouncyCastleProvider());
- }
+
@Test
public void testResolveNodeAddressesWhenLocalAddressSpecified() {
diff --git a/core/src/test/java/bisq/core/network/p2p/seed/SeedNodeAddressesTest.java b/core/src/test/java/bisq/core/network/p2p/seed/SeedNodeAddressesTest.java
index 580c3393e11..b036f98faff 100644
--- a/core/src/test/java/bisq/core/network/p2p/seed/SeedNodeAddressesTest.java
+++ b/core/src/test/java/bisq/core/network/p2p/seed/SeedNodeAddressesTest.java
@@ -37,10 +37,7 @@
import static org.junit.Assert.assertTrue;
public class SeedNodeAddressesTest {
- @Before
- public void setUp() {
- Security.addProvider(new BouncyCastleProvider());
- }
+
@Test
public void testCollector() {
diff --git a/core/src/test/java/bisq/core/offer/OfferTest.java b/core/src/test/java/bisq/core/offer/OfferTest.java
index 88a249fe66d..c8d64dc76cb 100644
--- a/core/src/test/java/bisq/core/offer/OfferTest.java
+++ b/core/src/test/java/bisq/core/offer/OfferTest.java
@@ -17,6 +17,7 @@
package bisq.core.offer;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -30,6 +31,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest(OfferPayload.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class OfferTest {
@Test
diff --git a/core/src/test/java/bisq/core/offer/OpenOfferManagerTest.java b/core/src/test/java/bisq/core/offer/OpenOfferManagerTest.java
index d26b502e983..d94d8ba5aba 100644
--- a/core/src/test/java/bisq/core/offer/OpenOfferManagerTest.java
+++ b/core/src/test/java/bisq/core/offer/OpenOfferManagerTest.java
@@ -9,6 +9,7 @@
import java.util.concurrent.atomic.AtomicBoolean;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -23,6 +24,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({P2PService.class, PeerManager.class, OfferBookService.class, Storage.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class OpenOfferManagerTest {
@Test
diff --git a/core/src/test/java/bisq/core/payment/PaymentAccountsTest.java b/core/src/test/java/bisq/core/payment/PaymentAccountsTest.java
index b80a9aff399..871215967a0 100644
--- a/core/src/test/java/bisq/core/payment/PaymentAccountsTest.java
+++ b/core/src/test/java/bisq/core/payment/PaymentAccountsTest.java
@@ -26,6 +26,7 @@
import java.util.Set;
import java.util.function.BiFunction;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -41,6 +42,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({PaymentAccount.class, AccountAgeWitness.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class PaymentAccountsTest {
@Test
public void testGetOldestPaymentAccountForOfferWhenNoValidAccounts() {
diff --git a/core/src/test/java/bisq/core/payment/ReceiptPredicatesTest.java b/core/src/test/java/bisq/core/payment/ReceiptPredicatesTest.java
index e6de2beb7cb..3ff6e92207c 100644
--- a/core/src/test/java/bisq/core/payment/ReceiptPredicatesTest.java
+++ b/core/src/test/java/bisq/core/payment/ReceiptPredicatesTest.java
@@ -23,6 +23,7 @@
import com.google.common.collect.Lists;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -36,6 +37,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({NationalBankAccount.class, SepaAccount.class, SepaInstantAccount.class, PaymentMethod.class, SameBankAccount.class, SpecificBanksAccount.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class ReceiptPredicatesTest {
private final ReceiptPredicates predicates = new ReceiptPredicates();
diff --git a/core/src/test/java/bisq/core/payment/ReceiptValidatorTest.java b/core/src/test/java/bisq/core/payment/ReceiptValidatorTest.java
index 16f4cd236ef..c33adf62052 100644
--- a/core/src/test/java/bisq/core/payment/ReceiptValidatorTest.java
+++ b/core/src/test/java/bisq/core/payment/ReceiptValidatorTest.java
@@ -20,6 +20,7 @@
import bisq.core.offer.Offer;
import bisq.core.payment.payload.PaymentMethod;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -36,6 +37,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({SpecificBanksAccount.class, SameBankAccount.class, NationalBankAccount.class,
MoneyGramAccount.class, WesternUnionAccount.class, CashDepositAccount.class, PaymentMethod.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class ReceiptValidatorTest {
private ReceiptValidator validator;
private PaymentAccount account;
diff --git a/core/src/test/java/bisq/core/trade/TradableListTest.java b/core/src/test/java/bisq/core/trade/TradableListTest.java
index 270b5c7cf92..2de76604e47 100644
--- a/core/src/test/java/bisq/core/trade/TradableListTest.java
+++ b/core/src/test/java/bisq/core/trade/TradableListTest.java
@@ -26,16 +26,13 @@
import io.bisq.generated.protobuffer.PB;
import mockit.Mocked;
-import mockit.integration.junit4.JMockit;
import org.junit.Test;
-import org.junit.runner.RunWith;
import static io.bisq.generated.protobuffer.PB.PersistableEnvelope.MessageCase.TRADABLE_LIST;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-@RunWith(JMockit.class)
public class TradableListTest {
@Test
diff --git a/core/src/test/java/bisq/core/user/PreferencesTest.java b/core/src/test/java/bisq/core/user/PreferencesTest.java
index 40a52138265..a58aeab95b6 100644
--- a/core/src/test/java/bisq/core/user/PreferencesTest.java
+++ b/core/src/test/java/bisq/core/user/PreferencesTest.java
@@ -34,6 +34,7 @@
import java.util.List;
import java.util.Locale;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -50,6 +51,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({Storage.class, PreferencesPayload.class, BisqEnvironment.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class PreferencesTest {
private Preferences preferences;
diff --git a/desktop/build.gradle b/desktop/build.gradle
index 9385ab687b5..5480cb388ea 100644
--- a/desktop/build.gradle
+++ b/desktop/build.gradle
@@ -17,10 +17,12 @@ apply plugin: 'com.github.johnrengelman.shadow'
group = 'network.bisq'
version = '0.8.0-SNAPSHOT'
-sourceCompatibility = 1.8
+sourceCompatibility = 1.10
mainClassName = 'bisq.desktop.app.BisqAppMain'
+def jmockitVersion = '1.42'
+
tasks.withType(AbstractArchiveTask) {
preserveFileTimestamps = false
reproducibleFileOrder = true
@@ -49,26 +51,33 @@ dependencies {
compile 'org.reactfx:reactfx:2.0-M3'
compile 'net.glxn:qrgen:1.3'
compile 'de.jensd:fontawesomefx:8.0.0'
- compile 'de.jensd:fontawesomefx-commons:8.15'
- compile 'de.jensd:fontawesomefx-materialdesignfont:1.7.22-4'
+ compile 'de.jensd:fontawesomefx-commons:9.1.2'
+ compile 'de.jensd:fontawesomefx-materialdesignfont:2.0.26-9.1.2'
compile 'com.googlecode.jcsv:jcsv:1.4.0'
compile 'com.github.sarxos:webcam-capture:0.3.12'
- compileOnly 'org.projectlombok:lombok:1.16.16'
- annotationProcessor 'org.projectlombok:lombok:1.16.16'
- testCompile('org.mockito:mockito-core:2.8.9') {
+ compileOnly 'org.projectlombok:lombok:1.18.2'
+ annotationProcessor 'org.projectlombok:lombok:1.18.2'
+
+ testCompile "org.jmockit:jmockit:$jmockitVersion"
+ testCompile('org.mockito:mockito-core:2.21.0') {
exclude(module: 'objenesis')
}
- testCompile 'org.jmockit:jmockit:1.30'
- testCompile 'org.powermock:powermock-module-junit4:1.7.1'
- testCompile 'org.powermock:powermock-api-mockito2:1.7.1'
+ testCompile 'org.powermock:powermock-module-junit4:2.0.0-beta.5'
+ testCompile 'org.powermock:powermock-api-mockito2:2.0.0-beta.5'
testCompile 'org.springframework:spring-test:4.3.6.RELEASE'
testCompile 'com.natpryce:make-it-easy:4.0.1'
- testCompileOnly 'org.projectlombok:lombok:1.16.16'
- testAnnotationProcessor 'org.projectlombok:lombok:1.16.16'
+ testCompileOnly 'org.projectlombok:lombok:1.18.2'
+ testAnnotationProcessor 'org.projectlombok:lombok:1.18.2'
}
+test {
+ systemProperty 'jdk.attach.allowAttachSelf', true
+
+ def jmockit = configurations.testCompile.files.find { it.name.contains("jmockit") }.absolutePath
+ jvmArgs "-javaagent:$jmockit"
+}
build.dependsOn installDist
installDist.destinationDir = file('build/app')
@@ -88,8 +97,8 @@ dependencyVerification {
'org.reactfx:reactfx:81ec8fe545d65661222735711114c2ce427e2187a65f1722e8ac4e4805beeca3',
'net.glxn:qrgen:c85d9d8512d91e8ad11fe56259a7825bd50ce0245447e236cf168d1b17591882',
'de.jensd:fontawesomefx:73bacc991a0a6f5cf0f911767c8db161e0949dbca61e8371eb4342e3da96887b',
- 'de.jensd:fontawesomefx-materialdesignfont:8f700556bbfdc4a581224d3bd6ff869b8a03f6670bd7e0fc78884bd2f31fdb64',
- 'de.jensd:fontawesomefx-commons:e1505a31433f1b2902478217651afc78dae5ab09670336afc46e582a1dea1e4d',
+ 'de.jensd:fontawesomefx-materialdesignfont:dbad8dfdd1c85e298d5bbae25b2399aec9e85064db57b2427d10f3815aa98752',
+ 'de.jensd:fontawesomefx-commons:5539bb3335ecb822dbf928546f57766eeb9f1516cc1417a064b5709629612149',
'com.googlecode.jcsv:jcsv:73ca7d715e90c8d2c2635cc284543b038245a34f70790660ed590e157b8714a2',
'com.github.sarxos:webcam-capture:d960b7ea8ec3ddf2df0725ef214c3fccc9699ea7772df37f544e1f8e4fd665f6',
'com.google.protobuf:protobuf-java:b5e2d91812d183c9f053ffeebcbcda034d4de6679521940a19064714966c2cd4',
diff --git a/desktop/package/osx/create_app.sh b/desktop/package/osx/create_app.sh
index 0de831e555c..3bd54c848c8 100755
--- a/desktop/package/osx/create_app.sh
+++ b/desktop/package/osx/create_app.sh
@@ -8,10 +8,23 @@ set -e
version="0.8.0"
-../gradlew build -x test shadowJar
+cd ..
+./gradlew :desktop:build -x test shadowJar
+cd desktop
EXE_JAR=build/libs/desktop-$version-all.jar
+# we need to strip out Java 9 module configuration used in the fontawesomefx library as it causes the javapackager to stop,
+# because of this existing module information, although it is not used as a module.
+echo Unzipping jar to delete module config
+tmp=build/libs/tmp
+unzip -o -q $EXE_JAR -d $tmp
+rm $tmp/module-info.class
+rm $EXE_JAR
+echo Zipping jar again without module config
+cd $tmp; zip -r -q -X "../desktop-$version-all.jar" *
+cd ../../../; rm -rf $tmp
+
echo SHA 256 before stripping jar file:
shasum -a256 $EXE_JAR | awk '{print $1}'
@@ -86,7 +99,8 @@ $JAVA_HOME/bin/javapackager \
-title Bisq \
-vendor Bisq \
-outdir deploy \
- -srcfiles "deploy/Bisq-$version.jar" \
+ -srcdir deploy \
+ -srcfiles "Bisq-$version.jar" \
-appclass bisq.desktop.app.BisqAppMain \
-outfile Bisq
diff --git a/desktop/src/main/java/bisq/desktop/components/AutoTooltipButton.java b/desktop/src/main/java/bisq/desktop/components/AutoTooltipButton.java
index 02c45ce6bf2..438bf1791f7 100644
--- a/desktop/src/main/java/bisq/desktop/components/AutoTooltipButton.java
+++ b/desktop/src/main/java/bisq/desktop/components/AutoTooltipButton.java
@@ -20,8 +20,7 @@
import javafx.scene.Node;
import javafx.scene.control.Button;
import javafx.scene.control.Skin;
-
-import com.sun.javafx.scene.control.skin.ButtonSkin;
+import javafx.scene.control.skin.ButtonSkin;
import static bisq.desktop.components.TooltipUtil.showTooltipIfTruncated;
diff --git a/desktop/src/main/java/bisq/desktop/components/AutoTooltipCheckBox.java b/desktop/src/main/java/bisq/desktop/components/AutoTooltipCheckBox.java
index 7a980974985..e39b694bf62 100644
--- a/desktop/src/main/java/bisq/desktop/components/AutoTooltipCheckBox.java
+++ b/desktop/src/main/java/bisq/desktop/components/AutoTooltipCheckBox.java
@@ -19,8 +19,7 @@
import javafx.scene.control.CheckBox;
import javafx.scene.control.Skin;
-
-import com.sun.javafx.scene.control.skin.CheckBoxSkin;
+import javafx.scene.control.skin.CheckBoxSkin;
import static bisq.desktop.components.TooltipUtil.showTooltipIfTruncated;
diff --git a/desktop/src/main/java/bisq/desktop/components/AutoTooltipLabel.java b/desktop/src/main/java/bisq/desktop/components/AutoTooltipLabel.java
index 1f939ac4cd8..96681d4aa68 100644
--- a/desktop/src/main/java/bisq/desktop/components/AutoTooltipLabel.java
+++ b/desktop/src/main/java/bisq/desktop/components/AutoTooltipLabel.java
@@ -19,8 +19,7 @@
import javafx.scene.control.Label;
import javafx.scene.control.Skin;
-
-import com.sun.javafx.scene.control.skin.LabelSkin;
+import javafx.scene.control.skin.LabelSkin;
import static bisq.desktop.components.TooltipUtil.showTooltipIfTruncated;
diff --git a/desktop/src/main/java/bisq/desktop/components/AutoTooltipRadioButton.java b/desktop/src/main/java/bisq/desktop/components/AutoTooltipRadioButton.java
index 1aeef854c3b..4b6f3ec89b8 100644
--- a/desktop/src/main/java/bisq/desktop/components/AutoTooltipRadioButton.java
+++ b/desktop/src/main/java/bisq/desktop/components/AutoTooltipRadioButton.java
@@ -19,8 +19,7 @@
import javafx.scene.control.RadioButton;
import javafx.scene.control.Skin;
-
-import com.sun.javafx.scene.control.skin.RadioButtonSkin;
+import javafx.scene.control.skin.RadioButtonSkin;
import static bisq.desktop.components.TooltipUtil.showTooltipIfTruncated;
diff --git a/desktop/src/main/java/bisq/desktop/components/AutoTooltipToggleButton.java b/desktop/src/main/java/bisq/desktop/components/AutoTooltipToggleButton.java
index 6a165773708..a530599c8ff 100644
--- a/desktop/src/main/java/bisq/desktop/components/AutoTooltipToggleButton.java
+++ b/desktop/src/main/java/bisq/desktop/components/AutoTooltipToggleButton.java
@@ -20,8 +20,7 @@
import javafx.scene.Node;
import javafx.scene.control.Skin;
import javafx.scene.control.ToggleButton;
-
-import com.sun.javafx.scene.control.skin.ToggleButtonSkin;
+import javafx.scene.control.skin.ToggleButtonSkin;
import static bisq.desktop.components.TooltipUtil.showTooltipIfTruncated;
diff --git a/desktop/src/main/java/bisq/desktop/components/indicator/TxConfidenceIndicator.java b/desktop/src/main/java/bisq/desktop/components/indicator/TxConfidenceIndicator.java
index 94c7ee60d8c..39484521a97 100644
--- a/desktop/src/main/java/bisq/desktop/components/indicator/TxConfidenceIndicator.java
+++ b/desktop/src/main/java/bisq/desktop/components/indicator/TxConfidenceIndicator.java
@@ -266,7 +266,6 @@ protected Skin> createDefaultSkin() {
* This method is called from CSS code to get the correct initial value.
*/
@Deprecated
- @Override
@SuppressWarnings("deprecation")
protected /*do not make final*/ Boolean impl_cssGetFocusTraversableInitialValue() {
return Boolean.FALSE;
diff --git a/desktop/src/main/java/bisq/desktop/components/indicator/behavior/StaticProgressIndicatorBehavior.java b/desktop/src/main/java/bisq/desktop/components/indicator/behavior/StaticProgressIndicatorBehavior.java
deleted file mode 100644
index cbd2c83d3f8..00000000000
--- a/desktop/src/main/java/bisq/desktop/components/indicator/behavior/StaticProgressIndicatorBehavior.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * This file is part of Bisq.
- *
- * Bisq is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or (at
- * your option) any later version.
- *
- * Bisq is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with Bisq. If not, see .
- */
-
-/*
- * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-package bisq.desktop.components.indicator.behavior;
-
-import bisq.desktop.components.indicator.TxConfidenceIndicator;
-
-import com.sun.javafx.scene.control.behavior.BehaviorBase;
-
-import java.util.Collections;
-
-// TODO Copied form OpenJFX, check license issues and way how we integrated it
-// We changed behaviour which was not exposed via APIs
-
-/**
- * @param
- */
-public class StaticProgressIndicatorBehavior extends BehaviorBase {
-
- /**
- * ************************************************************************
- * *
- * Constructors *
- * *
- * ************************************************************************
- */
-
- public StaticProgressIndicatorBehavior(final C progress) {
- super(progress, Collections.emptyList());
- }
-}
diff --git a/desktop/src/main/java/bisq/desktop/components/indicator/skin/StaticProgressIndicatorSkin.java b/desktop/src/main/java/bisq/desktop/components/indicator/skin/StaticProgressIndicatorSkin.java
index 38b28e0961d..d994e28a9e0 100644
--- a/desktop/src/main/java/bisq/desktop/components/indicator/skin/StaticProgressIndicatorSkin.java
+++ b/desktop/src/main/java/bisq/desktop/components/indicator/skin/StaticProgressIndicatorSkin.java
@@ -43,7 +43,6 @@
package bisq.desktop.components.indicator.skin;
import bisq.desktop.components.indicator.TxConfidenceIndicator;
-import bisq.desktop.components.indicator.behavior.StaticProgressIndicatorBehavior;
import javafx.scene.Node;
import javafx.scene.control.SkinBase;
@@ -57,8 +56,6 @@
import javafx.scene.shape.Circle;
import javafx.scene.transform.Scale;
-import com.sun.javafx.scene.control.skin.BehaviorSkinBase;
-
import javafx.css.CssMetaData;
import javafx.css.StyleOrigin;
import javafx.css.Styleable;
@@ -66,10 +63,9 @@
import javafx.css.StyleableIntegerProperty;
import javafx.css.StyleableObjectProperty;
import javafx.css.StyleableProperty;
-
-import com.sun.javafx.css.converters.BooleanConverter;
-import com.sun.javafx.css.converters.PaintConverter;
-import com.sun.javafx.css.converters.SizeConverter;
+import javafx.css.converter.BooleanConverter;
+import javafx.css.converter.PaintConverter;
+import javafx.css.converter.SizeConverter;
import javafx.geometry.Insets;
import javafx.geometry.NodeOrientation;
@@ -86,8 +82,7 @@
// TODO Copied form OpenJFX, check license issues and way how we integrated it
// We changed behaviour which was not exposed via APIs
-public class StaticProgressIndicatorSkin extends BehaviorSkinBase> {
+public class StaticProgressIndicatorSkin extends SkinBase {
/**
* ************************************************************************
@@ -212,7 +207,7 @@ public CssMetaData getCssMetaData() {
*/
@SuppressWarnings("deprecation")
public StaticProgressIndicatorSkin(TxConfidenceIndicator control) {
- super(control, new StaticProgressIndicatorBehavior<>(control));
+ super(control);
InvalidationListener indeterminateListener = valueModel -> initialize();
control.indeterminateProperty().addListener(indeterminateListener);
@@ -227,7 +222,7 @@ public StaticProgressIndicatorSkin(TxConfidenceIndicator control) {
}
if (spinner != null) {
- if (!(getSkinnable().impl_isTreeVisible() && getSkinnable().getScene() != null)) {
+ if (getSkinnable().getScene() != null) {
getChildren().remove(spinner);
spinner = null;
timeLineNulled = true;
diff --git a/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java b/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java
index 4e3acc5e8ff..fad9f8de312 100644
--- a/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java
+++ b/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartView.java
@@ -204,7 +204,7 @@ protected void activate() {
}
});
- model.currencyListItems.addListener(currencyListItemsListener);
+ model.currencyListItems.getObservableList().addListener(currencyListItemsListener);
model.getOfferBookListItems().addListener(changeListener);
tradeCurrencySubscriber = EasyBind.subscribe(model.selectedTradeCurrencyProperty,
@@ -295,7 +295,7 @@ public Number fromString(String string) {
protected void deactivate() {
model.getOfferBookListItems().removeListener(changeListener);
tabPaneSelectionModel.selectedIndexProperty().removeListener(selectedTabIndexListener);
- model.currencyListItems.removeListener(currencyListItemsListener);
+ model.currencyListItems.getObservableList().removeListener(currencyListItemsListener);
tradeCurrencySubscriber.unsubscribe();
currencyComboBox.setOnAction(null);
buyOfferTableView.getSelectionModel().selectedItemProperty().removeListener(buyTableRowSelectionListener);
diff --git a/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java b/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java
index 10458bb67d2..4b4c3b22ff5 100644
--- a/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java
+++ b/desktop/src/main/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModel.java
@@ -234,11 +234,11 @@ public ObservableList getTopSellOfferList() {
}
public ObservableList getCurrencyListItems() {
- return currencyListItems;
+ return currencyListItems.getObservableList();
}
public Optional getSelectedCurrencyListItem() {
- return currencyListItems.stream().filter(e -> e.tradeCurrency.equals(selectedTradeCurrencyProperty.get())).findAny();
+ return currencyListItems.getObservableList().stream().filter(e -> e.tradeCurrency.equals(selectedTradeCurrencyProperty.get())).findAny();
}
public int getMaxNumberOfPriceZeroDecimalsToColorize(Offer offer) {
diff --git a/desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java b/desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java
index 1da1562dae1..fd835a17b6e 100644
--- a/desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java
+++ b/desktop/src/main/java/bisq/desktop/main/market/trades/TradesChartsViewModel.java
@@ -220,11 +220,11 @@ public String getCurrencyCode() {
}
public ObservableList getCurrencyListItems() {
- return currencyListItems;
+ return currencyListItems.getObservableList();
}
public Optional getSelectedCurrencyListItem() {
- return currencyListItems.stream().filter(e -> e.tradeCurrency.equals(selectedTradeCurrencyProperty.get())).findAny();
+ return currencyListItems.getObservableList().stream().filter(e -> e.tradeCurrency.equals(selectedTradeCurrencyProperty.get())).findAny();
}
///////////////////////////////////////////////////////////////////////////////////////////
diff --git a/desktop/src/main/java/bisq/desktop/util/CurrencyList.java b/desktop/src/main/java/bisq/desktop/util/CurrencyList.java
index 7e8833062d3..b8f193a7638 100644
--- a/desktop/src/main/java/bisq/desktop/util/CurrencyList.java
+++ b/desktop/src/main/java/bisq/desktop/util/CurrencyList.java
@@ -22,7 +22,8 @@
import com.google.common.collect.Lists;
-import com.sun.javafx.collections.ObservableListWrapper;
+import javafx.collections.FXCollections;
+import javafx.collections.ObservableList;
import java.util.ArrayList;
import java.util.Comparator;
@@ -36,25 +37,31 @@
import javax.annotation.Nullable;
-public class CurrencyList extends ObservableListWrapper {
+public class CurrencyList {
private final CurrencyPredicates predicates;
private final Preferences preferences;
+ private final List delegate;
public CurrencyList(Preferences preferences) {
this(new ArrayList<>(), preferences, new CurrencyPredicates());
}
- CurrencyList(List delegate, Preferences preferences, CurrencyPredicates predicates) {
- super(delegate);
+ public CurrencyList(List delegate, Preferences preferences, CurrencyPredicates predicates) {
+ this.delegate = delegate;
this.predicates = predicates;
this.preferences = preferences;
}
+ public ObservableList getObservableList() {
+ return FXCollections.observableList(delegate);
+ }
+
public void updateWithCurrencies(List currencies, @Nullable CurrencyListItem first) {
List result = Lists.newLinkedList();
Optional.ofNullable(first).ifPresent(result::add);
result.addAll(getPartitionedSortedItems(currencies));
- setAll(result);
+ delegate.clear();
+ delegate.addAll(result);
}
private List getPartitionedSortedItems(List currencies) {
diff --git a/desktop/src/main/java/bisq/desktop/util/ImageUtil.java b/desktop/src/main/java/bisq/desktop/util/ImageUtil.java
index 200dc0b2136..45114e26418 100644
--- a/desktop/src/main/java/bisq/desktop/util/ImageUtil.java
+++ b/desktop/src/main/java/bisq/desktop/util/ImageUtil.java
@@ -22,7 +22,9 @@
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
-import com.sun.javafx.tk.quantum.QuantumToolkit;
+import java.awt.GraphicsConfiguration;
+import java.awt.GraphicsEnvironment;
+import java.awt.geom.AffineTransform;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -57,10 +59,8 @@ public static ImageView getCountryIconImageView(Country country) {
}
public static boolean isRetina() {
- float maxRenderScale = ((QuantumToolkit) QuantumToolkit.getToolkit()).getMaxRenderScale();
- @SuppressWarnings("UnnecessaryLocalVariable")
- boolean isRetina = maxRenderScale > 1.9f;
- //log.debug("isRetina=" + isRetina + " / maxRenderScale=" + maxRenderScale);
- return isRetina;
+ final GraphicsConfiguration gfxConfig = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice().getDefaultConfiguration();
+ final AffineTransform transform = gfxConfig.getDefaultTransform();
+ return !transform.isIdentity();
}
}
diff --git a/desktop/src/test/java/bisq/desktop/main/funds/transactions/TransactionAwareTradeTest.java b/desktop/src/test/java/bisq/desktop/main/funds/transactions/TransactionAwareTradeTest.java
index d91415102c4..8895a5749cf 100644
--- a/desktop/src/test/java/bisq/desktop/main/funds/transactions/TransactionAwareTradeTest.java
+++ b/desktop/src/test/java/bisq/desktop/main/funds/transactions/TransactionAwareTradeTest.java
@@ -27,6 +27,7 @@
import java.util.Collections;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -41,6 +42,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest(Dispute.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
@SuppressWarnings("ConstantConditions")
public class TransactionAwareTradeTest {
private static final String XID = "123";
diff --git a/desktop/src/test/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModelTest.java b/desktop/src/test/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModelTest.java
index 5e7a303aabf..cec316e70fc 100644
--- a/desktop/src/test/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModelTest.java
+++ b/desktop/src/test/java/bisq/desktop/main/market/offerbook/OfferBookChartViewModelTest.java
@@ -30,6 +30,7 @@
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -50,6 +51,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({OfferBook.class, PriceFeedService.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class OfferBookChartViewModelTest {
@Before
diff --git a/desktop/src/test/java/bisq/desktop/main/market/spread/SpreadViewModelTest.java b/desktop/src/test/java/bisq/desktop/main/market/spread/SpreadViewModelTest.java
index 47aa519fcce..a53683d3448 100644
--- a/desktop/src/test/java/bisq/desktop/main/market/spread/SpreadViewModelTest.java
+++ b/desktop/src/test/java/bisq/desktop/main/market/spread/SpreadViewModelTest.java
@@ -28,6 +28,7 @@
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -45,6 +46,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({OfferBook.class, PriceFeedService.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class SpreadViewModelTest {
@Test
diff --git a/desktop/src/test/java/bisq/desktop/main/market/trades/TradesChartsViewModelTest.java b/desktop/src/test/java/bisq/desktop/main/market/trades/TradesChartsViewModelTest.java
index 17fbf0bdb8f..1b5e40005a4 100644
--- a/desktop/src/test/java/bisq/desktop/main/market/trades/TradesChartsViewModelTest.java
+++ b/desktop/src/test/java/bisq/desktop/main/market/trades/TradesChartsViewModelTest.java
@@ -38,10 +38,6 @@
import javafx.collections.FXCollections;
import javafx.collections.ObservableSet;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-import java.security.Security;
-
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
@@ -62,15 +58,12 @@
import mockit.Mock;
import mockit.MockUp;
import mockit.Tested;
-import mockit.integration.junit4.JMockit;
import org.junit.Before;
import org.junit.Test;
-import org.junit.runner.RunWith;
import static org.junit.Assert.assertEquals;
-@RunWith(JMockit.class)
public class TradesChartsViewModelTest {
@Tested
TradesChartsViewModel model;
@@ -131,7 +124,7 @@ public class TradesChartsViewModelTest {
@Before
public void setup() throws IOException {
- Security.addProvider(new BouncyCastleProvider());
+
dir = File.createTempFile("temp_tests1", "");
//noinspection ResultOfMethodCallIgnored
dir.delete();
diff --git a/desktop/src/test/java/bisq/desktop/main/offer/createoffer/CreateOfferViewModelTest.java b/desktop/src/test/java/bisq/desktop/main/offer/createoffer/CreateOfferViewModelTest.java
index 2caa9bfc294..61d10074230 100644
--- a/desktop/src/test/java/bisq/desktop/main/offer/createoffer/CreateOfferViewModelTest.java
+++ b/desktop/src/test/java/bisq/desktop/main/offer/createoffer/CreateOfferViewModelTest.java
@@ -46,6 +46,7 @@
import java.time.Instant;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -66,6 +67,7 @@
@PrepareForTest({BtcWalletService.class, AddressEntry.class, PriceFeedService.class, User.class,
FeeService.class, CreateOfferDataModel.class, PaymentAccount.class, BsqWalletService.class,
SecurityDepositValidator.class, AccountAgeWitnessService.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class CreateOfferViewModelTest {
private CreateOfferViewModel model;
diff --git a/desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookViewModelTest.java b/desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookViewModelTest.java
index ea6e4734470..d92f87c1fea 100644
--- a/desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookViewModelTest.java
+++ b/desktop/src/test/java/bisq/desktop/main/offer/offerbook/OfferBookViewModelTest.java
@@ -60,6 +60,7 @@
import com.natpryce.makeiteasy.Maker;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -82,6 +83,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({OfferBook.class, OpenOfferManager.class, PriceFeedService.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class OfferBookViewModelTest {
private static final Logger log = LoggerFactory.getLogger(OfferBookViewModelTest.class);
diff --git a/desktop/src/test/java/bisq/desktop/main/settings/preferences/PreferencesViewModelTest.java b/desktop/src/test/java/bisq/desktop/main/settings/preferences/PreferencesViewModelTest.java
index 0e2ac430ed4..42b368b1456 100644
--- a/desktop/src/test/java/bisq/desktop/main/settings/preferences/PreferencesViewModelTest.java
+++ b/desktop/src/test/java/bisq/desktop/main/settings/preferences/PreferencesViewModelTest.java
@@ -27,16 +27,12 @@
import javafx.collections.FXCollections;
import javafx.collections.ObservableMap;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-import java.security.Security;
-
import java.util.ArrayList;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
-import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -46,12 +42,10 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({ArbitratorManager.class, Preferences.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class PreferencesViewModelTest {
- @Before
- public void setUp() {
- Security.addProvider(new BouncyCastleProvider());
- }
+
@Test
public void testGetArbitrationLanguages() {
diff --git a/desktop/src/test/java/bisq/desktop/util/BSFormatterTest.java b/desktop/src/test/java/bisq/desktop/util/BSFormatterTest.java
index 2996e76fdef..292435e4eb8 100644
--- a/desktop/src/test/java/bisq/desktop/util/BSFormatterTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/BSFormatterTest.java
@@ -29,6 +29,7 @@
import java.util.Locale;
import java.util.concurrent.TimeUnit;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -53,6 +54,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest({Offer.class, OfferPayload.class})
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class BSFormatterTest {
private BSFormatter formatter;
diff --git a/desktop/src/test/java/bisq/desktop/util/CurrencyListTest.java b/desktop/src/test/java/bisq/desktop/util/CurrencyListTest.java
index dfa16ad992b..a73d5124c24 100644
--- a/desktop/src/test/java/bisq/desktop/util/CurrencyListTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/CurrencyListTest.java
@@ -28,6 +28,7 @@
import java.util.List;
import java.util.Locale;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
@@ -41,6 +42,7 @@
@RunWith(PowerMockRunner.class)
@PrepareForTest(Preferences.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*"})
public class CurrencyListTest {
private static final TradeCurrency USD = new FiatCurrency("USD");
private static final TradeCurrency RUR = new FiatCurrency("RUR");
diff --git a/desktop/src/test/java/bisq/desktop/util/validation/AccountNrValidatorTest.java b/desktop/src/test/java/bisq/desktop/util/validation/AccountNrValidatorTest.java
index 75047bec165..4584d98cd0c 100644
--- a/desktop/src/test/java/bisq/desktop/util/validation/AccountNrValidatorTest.java
+++ b/desktop/src/test/java/bisq/desktop/util/validation/AccountNrValidatorTest.java
@@ -7,7 +7,6 @@
import org.junit.Before;
import org.junit.Test;
-import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
public class AccountNrValidatorTest {
diff --git a/monitor/build.gradle b/monitor/build.gradle
index b00b4f7b431..a4ac1b14d24 100644
--- a/monitor/build.gradle
+++ b/monitor/build.gradle
@@ -6,7 +6,7 @@ plugins {
group = 'network.bisq'
version = '0.8.0-SNAPSHOT'
-sourceCompatibility = 1.8
+sourceCompatibility = 1.10
mainClassName = 'bisq.monitor.MonitorMain'
@@ -20,8 +20,8 @@ dependencies {
compile project(':core')
compile 'com.sparkjava:spark-core:2.5.2'
compile 'net.gpedro.integrations.slack:slack-webhook:1.1.1'
- compileOnly 'org.projectlombok:lombok:1.16.16'
- annotationProcessor 'org.projectlombok:lombok:1.16.16'
+ compileOnly 'org.projectlombok:lombok:1.18.2'
+ annotationProcessor 'org.projectlombok:lombok:1.18.2'
}
build.dependsOn installDist
diff --git a/p2p/build.gradle b/p2p/build.gradle
index 3ed28d2e47a..b7dd2275c3b 100644
--- a/p2p/build.gradle
+++ b/p2p/build.gradle
@@ -6,7 +6,7 @@ plugins {
group = 'network.bisq'
version = '-SNAPSHOT'
-sourceCompatibility = 1.8
+sourceCompatibility = 1.10
repositories {
jcenter()
@@ -24,10 +24,10 @@ dependencies {
}
compile 'net.sf.jopt-simple:jopt-simple:5.0.3'
compile 'org.fxmisc.easybind:easybind:1.0.3'
- compileOnly 'org.projectlombok:lombok:1.16.16'
- annotationProcessor 'org.projectlombok:lombok:1.16.16'
+ compileOnly 'org.projectlombok:lombok:1.18.2'
+ annotationProcessor 'org.projectlombok:lombok:1.18.2'
testCompile 'junit:junit:4.12'
testCompile 'org.jmockit:jmockit:1.30'
- testCompileOnly 'org.projectlombok:lombok:1.16.16'
- testAnnotationProcessor 'org.projectlombok:lombok:1.16.16'
+ testCompileOnly 'org.projectlombok:lombok:1.18.2'
+ testAnnotationProcessor 'org.projectlombok:lombok:1.18.2'
}
diff --git a/p2p/src/test/java/bisq/network/crypto/EncryptionServiceTests.java b/p2p/src/test/java/bisq/network/crypto/EncryptionServiceTests.java
index c3f92564ac2..dc7bf583832 100644
--- a/p2p/src/test/java/bisq/network/crypto/EncryptionServiceTests.java
+++ b/p2p/src/test/java/bisq/network/crypto/EncryptionServiceTests.java
@@ -26,11 +26,8 @@
import io.bisq.generated.protobuffer.PB;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
-import java.security.Security;
import java.security.cert.CertificateException;
import java.io.File;
@@ -56,7 +53,7 @@ public class EncryptionServiceTests {
@Before
public void setup() throws CertificateException, NoSuchAlgorithmException, KeyStoreException, IOException, CryptoException {
- Security.addProvider(new BouncyCastleProvider());
+
dir = File.createTempFile("temp_tests", "");
//noinspection ResultOfMethodCallIgnored
dir.delete();
diff --git a/p2p/src/test/java/bisq/network/p2p/network/LocalhostNetworkNodeTest.java b/p2p/src/test/java/bisq/network/p2p/network/LocalhostNetworkNodeTest.java
index 1ec4f8b8c11..1a09281e0d6 100644
--- a/p2p/src/test/java/bisq/network/p2p/network/LocalhostNetworkNodeTest.java
+++ b/p2p/src/test/java/bisq/network/p2p/network/LocalhostNetworkNodeTest.java
@@ -19,10 +19,6 @@
import bisq.network.p2p.TestUtils;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-import java.security.Security;
-
import java.io.IOException;
import java.util.concurrent.CountDownLatch;
@@ -30,7 +26,6 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@@ -43,10 +38,7 @@
public class LocalhostNetworkNodeTest {
private static final Logger log = LoggerFactory.getLogger(LocalhostNetworkNodeTest.class);
- @Before
- public void setup() {
- Security.addProvider(new BouncyCastleProvider());
- }
+
@Test
diff --git a/p2p/src/test/java/bisq/network/p2p/network/TorNetworkNodeTest.java b/p2p/src/test/java/bisq/network/p2p/network/TorNetworkNodeTest.java
index bc4654d424d..2245a3ebd99 100644
--- a/p2p/src/test/java/bisq/network/p2p/network/TorNetworkNodeTest.java
+++ b/p2p/src/test/java/bisq/network/p2p/network/TorNetworkNodeTest.java
@@ -24,10 +24,6 @@
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.SettableFuture;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
-import java.security.Security;
-
import java.io.File;
import java.io.IOException;
@@ -38,7 +34,6 @@
import org.jetbrains.annotations.NotNull;
-import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
@@ -52,10 +47,7 @@ public class TorNetworkNodeTest {
private static final Logger log = LoggerFactory.getLogger(TorNetworkNodeTest.class);
private CountDownLatch latch;
- @Before
- public void setup() {
- Security.addProvider(new BouncyCastleProvider());
- }
+
@Test
public void testTorNodeBeforeSecondReady() throws InterruptedException, IOException {
diff --git a/p2p/src/test/java/bisq/network/p2p/storage/P2PDataStorageTest.java b/p2p/src/test/java/bisq/network/p2p/storage/P2PDataStorageTest.java
index 06d70e8a3d6..b8cd84bea77 100644
--- a/p2p/src/test/java/bisq/network/p2p/storage/P2PDataStorageTest.java
+++ b/p2p/src/test/java/bisq/network/p2p/storage/P2PDataStorageTest.java
@@ -31,13 +31,10 @@
import bisq.common.proto.persistable.PersistenceProtoResolver;
import bisq.common.storage.FileUtil;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
import java.security.InvalidKeyException;
import java.security.KeyPair;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
-import java.security.Security;
import java.security.SignatureException;
import java.security.cert.CertificateException;
@@ -84,7 +81,7 @@ public class P2PDataStorageTest {
@Before
public void setup() throws InterruptedException, NoSuchAlgorithmException, CertificateException, KeyStoreException, IOException, CryptoException, SignatureException, InvalidKeyException {
- Security.addProvider(new BouncyCastleProvider());
+
dir1 = File.createTempFile("temp_tests1", "");
//noinspection ResultOfMethodCallIgnored
dir1.delete();
diff --git a/p2p/src/test/java/bisq/network/p2p/storage/ProtectedDataStorageTest.java b/p2p/src/test/java/bisq/network/p2p/storage/ProtectedDataStorageTest.java
index 3b01880ce5e..3a1bb64107a 100644
--- a/p2p/src/test/java/bisq/network/p2p/storage/ProtectedDataStorageTest.java
+++ b/p2p/src/test/java/bisq/network/p2p/storage/ProtectedDataStorageTest.java
@@ -34,14 +34,11 @@
import bisq.common.crypto.Sig;
import bisq.common.storage.FileUtil;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
import java.security.InvalidKeyException;
import java.security.KeyPair;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.NoSuchProviderException;
-import java.security.Security;
import java.security.SignatureException;
import java.security.cert.CertificateException;
@@ -84,7 +81,7 @@ public class ProtectedDataStorageTest {
@Before
public void setup() throws InterruptedException, NoSuchAlgorithmException, CertificateException, KeyStoreException, IOException, CryptoException, SignatureException, InvalidKeyException {
- Security.addProvider(new BouncyCastleProvider());
+
dir1 = File.createTempFile("temp_tests1", "");
//noinspection ResultOfMethodCallIgnored,ResultOfMethodCallIgnored
dir1.delete();
diff --git a/p2p/src/test/java/bisq/network/p2p/storage/messages/AddDataMessageTest.java b/p2p/src/test/java/bisq/network/p2p/storage/messages/AddDataMessageTest.java
index 4c79f85682b..fd49b153ee5 100644
--- a/p2p/src/test/java/bisq/network/p2p/storage/messages/AddDataMessageTest.java
+++ b/p2p/src/test/java/bisq/network/p2p/storage/messages/AddDataMessageTest.java
@@ -32,12 +32,9 @@
import org.apache.commons.lang3.RandomUtils;
-import org.bouncycastle.jce.provider.BouncyCastleProvider;
-
import java.security.InvalidKeyException;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
-import java.security.Security;
import java.security.SignatureException;
import java.security.cert.CertificateException;
@@ -60,7 +57,7 @@ public class AddDataMessageTest {
@Before
public void setup() throws InterruptedException, NoSuchAlgorithmException, CertificateException, KeyStoreException, IOException, CryptoException, SignatureException, InvalidKeyException {
- Security.addProvider(new BouncyCastleProvider());
+
dir1 = File.createTempFile("temp_tests1", "");
//noinspection ResultOfMethodCallIgnored
dir1.delete();
diff --git a/pricenode/build.gradle b/pricenode/build.gradle
index c39959467cc..46912983bfd 100644
--- a/pricenode/build.gradle
+++ b/pricenode/build.gradle
@@ -3,8 +3,8 @@ plugins {
id "org.springframework.boot" version "1.5.10.RELEASE"
}
-sourceCompatibility = 1.8
-targetCompatibility = 1.8
+sourceCompatibility = 1.10
+targetCompatibility = 1.10
version = file("src/main/resources/version.txt").text
diff --git a/relay/build.gradle b/relay/build.gradle
index 9006d27cba8..4893a113c87 100644
--- a/relay/build.gradle
+++ b/relay/build.gradle
@@ -3,8 +3,8 @@ plugins {
id "org.springframework.boot" version "1.5.10.RELEASE"
}
-sourceCompatibility = 1.8
-targetCompatibility = 1.8
+sourceCompatibility = 1.10
+targetCompatibility = 1.10
version = file("src/main/resources/version.txt").text
@@ -27,8 +27,8 @@ dependencies {
compile("com.turo:pushy:0.13.2")
compile("com.google.firebase:firebase-admin:6.2.0")
- compileOnly 'org.projectlombok:lombok:1.16.16'
- //annotationProcessor 'org.projectlombok:lombok:1.16.16'
+ compileOnly 'org.projectlombok:lombok:1.18.2'
+ //annotationProcessor 'org.projectlombok:lombok:1.18.2'
}
task stage {
diff --git a/seednode/build.gradle b/seednode/build.gradle
index 9e054eb4da8..e7e597687fe 100644
--- a/seednode/build.gradle
+++ b/seednode/build.gradle
@@ -15,7 +15,7 @@ apply plugin: 'com.github.johnrengelman.shadow'
group = 'network.bisq'
version = '0.8.0-SNAPSHOT'
-sourceCompatibility = 1.8
+sourceCompatibility = 1.10
mainClassName = 'bisq.seednode.SeedNodeMain'
@@ -30,8 +30,8 @@ repositories {
dependencies {
compile project(':core')
runtime 'org.bouncycastle:bcprov-jdk15on:1.56'
- compileOnly 'org.projectlombok:lombok:1.16.16'
- annotationProcessor 'org.projectlombok:lombok:1.16.16'
+ compileOnly 'org.projectlombok:lombok:1.18.2'
+ annotationProcessor 'org.projectlombok:lombok:1.18.2'
}
build.dependsOn installDist
diff --git a/statsnode/build.gradle b/statsnode/build.gradle
index 32d0e2786bf..7a3264f13f5 100644
--- a/statsnode/build.gradle
+++ b/statsnode/build.gradle
@@ -6,7 +6,7 @@ plugins {
group = 'network.bisq'
version = '0.8.0-SNAPSHOT'
-sourceCompatibility = 1.8
+sourceCompatibility = 1.10
mainClassName = 'bisq.statistics.StatisticsMain'
@@ -18,8 +18,8 @@ repositories {
dependencies {
compile project(':core')
- compileOnly 'org.projectlombok:lombok:1.16.16'
- annotationProcessor 'org.projectlombok:lombok:1.16.16'
+ compileOnly 'org.projectlombok:lombok:1.18.2'
+ annotationProcessor 'org.projectlombok:lombok:1.18.2'
}
build.dependsOn installDist