update dependencies for guava, simple-json-rpc and dependants

This commit is contained in:
Craig Raw 2022-11-21 12:08:27 +02:00
parent 3ff3fb29b0
commit 6337e1cf7d
2 changed files with 20 additions and 19 deletions

View file

@ -54,7 +54,7 @@ dependencies {
exclude group: 'org.hamcrest' exclude group: 'org.hamcrest'
exclude group: 'junit' exclude group: 'junit'
} }
implementation('com.google.guava:guava:28.2-jre') implementation('com.google.guava:guava:31.1-jre')
implementation('com.google.code.gson:gson:2.8.6') implementation('com.google.code.gson:gson:2.8.6')
implementation('com.h2database:h2:2.1.214') implementation('com.h2database:h2:2.1.214')
implementation('com.zaxxer:HikariCP:4.0.3') implementation('com.zaxxer:HikariCP:4.0.3')
@ -69,11 +69,11 @@ dependencies {
exclude group: 'com.beust', module: 'jcommander' exclude group: 'com.beust', module: 'jcommander'
} }
implementation('com.beust:jcommander:1.81') implementation('com.beust:jcommander:1.81')
implementation('com.github.arteam:simple-json-rpc-core:1.0') implementation('com.github.arteam:simple-json-rpc-core:1.3')
implementation('com.github.arteam:simple-json-rpc-client:1.0') { implementation('com.github.arteam:simple-json-rpc-client:1.3') {
exclude group: 'com.github.arteam', module: 'simple-json-rpc-core' exclude group: 'com.github.arteam', module: 'simple-json-rpc-core'
} }
implementation('com.github.arteam:simple-json-rpc-server:1.0') { implementation('com.github.arteam:simple-json-rpc-server:1.3') {
exclude group: 'org.slf4j' exclude group: 'org.slf4j'
} }
implementation('com.sparrowwallet:hummingbird:1.6.4') implementation('com.sparrowwallet:hummingbird:1.6.4')
@ -103,7 +103,7 @@ dependencies {
implementation('org.slf4j:jul-to-slf4j:1.7.30') { implementation('org.slf4j:jul-to-slf4j:1.7.30') {
exclude group: 'org.slf4j' exclude group: 'org.slf4j'
} }
implementation('com.sparrowwallet.nightjar:nightjar:0.2.33') implementation('com.sparrowwallet.nightjar:nightjar:0.2.34')
implementation('io.reactivex.rxjava2:rxjava:2.2.15') implementation('io.reactivex.rxjava2:rxjava:2.2.15')
implementation('io.reactivex.rxjava2:rxjavafx:2.2.2') implementation('io.reactivex.rxjava2:rxjavafx:2.2.2')
implementation('org.apache.commons:commons-lang3:3.7') implementation('org.apache.commons:commons-lang3:3.7')
@ -282,7 +282,7 @@ task packageTarDistribution(type: Tar) {
} }
extraJavaModuleInfo { extraJavaModuleInfo {
module('jackson-core-2.10.1.jar', 'com.fasterxml.jackson.core', '2.10.1') { module('jackson-core-2.13.2.jar', 'com.fasterxml.jackson.core', '2.13.2') {
exports('com.fasterxml.jackson.core') exports('com.fasterxml.jackson.core')
exports('com.fasterxml.jackson.core.async') exports('com.fasterxml.jackson.core.async')
exports('com.fasterxml.jackson.core.base') exports('com.fasterxml.jackson.core.base')
@ -297,11 +297,11 @@ extraJavaModuleInfo {
exports('com.fasterxml.jackson.core.util') exports('com.fasterxml.jackson.core.util')
uses('com.fasterxml.jackson.core.ObjectCodec') uses('com.fasterxml.jackson.core.ObjectCodec')
} }
module('jackson-annotations-2.10.1.jar', 'com.fasterxml.jackson.annotation', '2.10.1') { module('jackson-annotations-2.13.2.jar', 'com.fasterxml.jackson.annotation', '2.13.2') {
requires('com.fasterxml.jackson.core') requires('com.fasterxml.jackson.core')
exports('com.fasterxml.jackson.annotation') exports('com.fasterxml.jackson.annotation')
} }
module('jackson-databind-2.10.1.jar', 'com.fasterxml.jackson.databind', '2.10.1') { module('jackson-databind-2.13.2.jar', 'com.fasterxml.jackson.databind', '2.13.2') {
requires('java.desktop') requires('java.desktop')
requires('java.logging') requires('java.logging')
requires('com.fasterxml.jackson.annotation') requires('com.fasterxml.jackson.annotation')
@ -335,7 +335,7 @@ extraJavaModuleInfo {
exports('tornadofx.control') exports('tornadofx.control')
requires('javafx.controls') requires('javafx.controls')
} }
module('simple-json-rpc-core-1.0.jar', 'simple.json.rpc.core', '1.0') { module('simple-json-rpc-core-1.3.jar', 'simple.json.rpc.core', '1.3') {
exports('com.github.arteam.simplejsonrpc.core.annotation') exports('com.github.arteam.simplejsonrpc.core.annotation')
exports('com.github.arteam.simplejsonrpc.core.domain') exports('com.github.arteam.simplejsonrpc.core.domain')
requires('com.fasterxml.jackson.core') requires('com.fasterxml.jackson.core')
@ -343,7 +343,7 @@ extraJavaModuleInfo {
requires('com.fasterxml.jackson.databind') requires('com.fasterxml.jackson.databind')
requires('org.jetbrains.annotations') requires('org.jetbrains.annotations')
} }
module('simple-json-rpc-client-1.0.jar', 'simple.json.rpc.client', '1.0') { module('simple-json-rpc-client-1.3.jar', 'simple.json.rpc.client', '1.3') {
exports('com.github.arteam.simplejsonrpc.client') exports('com.github.arteam.simplejsonrpc.client')
exports('com.github.arteam.simplejsonrpc.client.builder') exports('com.github.arteam.simplejsonrpc.client.builder')
exports('com.github.arteam.simplejsonrpc.client.exception') exports('com.github.arteam.simplejsonrpc.client.exception')
@ -351,7 +351,7 @@ extraJavaModuleInfo {
requires('com.fasterxml.jackson.databind') requires('com.fasterxml.jackson.databind')
requires('simple.json.rpc.core') requires('simple.json.rpc.core')
} }
module('simple-json-rpc-server-1.0.jar', 'simple.json.rpc.server', '1.0') { module('simple-json-rpc-server-1.3.jar', 'simple.json.rpc.server', '1.3') {
exports('com.github.arteam.simplejsonrpc.server') exports('com.github.arteam.simplejsonrpc.server')
requires('simple.json.rpc.core') requires('simple.json.rpc.core')
requires('com.google.common') requires('com.google.common')
@ -407,7 +407,7 @@ extraJavaModuleInfo {
exports('com.google.common.util.concurrent.internal') exports('com.google.common.util.concurrent.internal')
} }
module('listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar', 'com.google.guava.listenablefuture', '9999.0-empty-to-avoid-conflict-with-guava') module('listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar', 'com.google.guava.listenablefuture', '9999.0-empty-to-avoid-conflict-with-guava')
module('guava-28.2-jre.jar', 'com.google.common', '28.2-jre') { module('guava-31.1-jre.jar', 'com.google.common', '31.1-jre') {
exports('com.google.common.eventbus') exports('com.google.common.eventbus')
exports('com.google.common.net') exports('com.google.common.net')
exports('com.google.common.base') exports('com.google.common.base')
@ -493,7 +493,7 @@ extraJavaModuleInfo {
module('cbor-0.9.jar', 'co.nstant.in.cbor', '0.9') { module('cbor-0.9.jar', 'co.nstant.in.cbor', '0.9') {
exports('co.nstant.in.cbor') exports('co.nstant.in.cbor')
} }
module('nightjar-0.2.33.jar', 'com.sparrowwallet.nightjar', '0.2.33') { module('nightjar-0.2.34.jar', 'com.sparrowwallet.nightjar', '0.2.34') {
requires('com.google.common') requires('com.google.common')
requires('net.sourceforge.streamsupport') requires('net.sourceforge.streamsupport')
requires('org.slf4j') requires('org.slf4j')

View file

@ -1,7 +1,6 @@
package com.sparrowwallet.sparrow.io.db; package com.sparrowwallet.sparrow.io.db;
import com.google.common.eventbus.Subscribe; import com.google.common.eventbus.Subscribe;
import com.google.common.io.Files;
import com.sparrowwallet.drongo.Utils; import com.sparrowwallet.drongo.Utils;
import com.sparrowwallet.drongo.crypto.Argon2KeyDeriver; import com.sparrowwallet.drongo.crypto.Argon2KeyDeriver;
import com.sparrowwallet.drongo.crypto.AsymmetricKeyDeriver; import com.sparrowwallet.drongo.crypto.AsymmetricKeyDeriver;
@ -31,6 +30,7 @@ import java.io.*;
import java.nio.ByteBuffer; import java.nio.ByteBuffer;
import java.nio.channels.FileChannel; import java.nio.channels.FileChannel;
import java.nio.charset.StandardCharsets; import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.StandardCopyOption; import java.nio.file.StandardCopyOption;
import java.security.SecureRandom; import java.security.SecureRandom;
import java.util.*; import java.util.*;
@ -625,25 +625,26 @@ public class DbPersistence implements Persistence {
} }
//Flyway does not support JPMS yet, so the migration files are extracted to a temp dir in order to avoid classloader encapsulation issues //Flyway does not support JPMS yet, so the migration files are extracted to a temp dir in order to avoid classloader encapsulation issues
private File getMigrationDir() { private File getMigrationDir() throws StorageException {
File migrationDir = Files.createTempDir();
try { try {
File migrationDir = Files.createTempDirectory("sparrowfly").toFile();
String[] files = IOUtils.getResourceListing(DbPersistence.class, MIGRATION_RESOURCES_DIR); String[] files = IOUtils.getResourceListing(DbPersistence.class, MIGRATION_RESOURCES_DIR);
for(String name : files) { for(String name : files) {
File targetFile = new File(migrationDir, name); File targetFile = new File(migrationDir, name);
try(InputStream inputStream = DbPersistence.class.getResourceAsStream("/" + MIGRATION_RESOURCES_DIR + name)) { try(InputStream inputStream = DbPersistence.class.getResourceAsStream("/" + MIGRATION_RESOURCES_DIR + name)) {
if(inputStream != null) { if(inputStream != null) {
java.nio.file.Files.copy(inputStream, targetFile.toPath(), StandardCopyOption.REPLACE_EXISTING); Files.copy(inputStream, targetFile.toPath(), StandardCopyOption.REPLACE_EXISTING);
} else { } else {
log.error("Could not load resource at /" + MIGRATION_RESOURCES_DIR + name); log.error("Could not load resource at /" + MIGRATION_RESOURCES_DIR + name);
} }
} }
} }
return migrationDir;
} catch(Exception e) { } catch(Exception e) {
log.error("Could not extract migration resources", e); log.error("Could not extract migration resources", e);
throw new StorageException("Could not extract migration resources", e);
} }
return migrationDir;
} }
private HikariDataSource getDataSource(Storage storage, String password) throws StorageException { private HikariDataSource getDataSource(Storage storage, String password) throws StorageException {