Core doesn't need a compile dep on guava (#1283)

This commit is contained in:
Andrzej Cichocki 2017-08-29 09:56:26 +01:00 committed by GitHub
parent e2f112c3a8
commit cd0ab40b2e
4 changed files with 8 additions and 4 deletions

View File

@ -16,6 +16,7 @@ dependencies {
compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackson_version" compile "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jackson_version"
// This adds support for java.time types. // This adds support for java.time types.
compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version" compile "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jackson_version"
compile "com.google.guava:guava:$guava_version"
testCompile project(path: ':core', configuration: 'testArtifacts') testCompile project(path: ':core', configuration: 'testArtifacts')
testCompile "junit:junit:$junit_version" testCompile "junit:junit:$junit_version"

View File

@ -116,7 +116,8 @@ class RPCClientProxyHandler(
private fun createRpcObservableMap(): RpcObservableMap { private fun createRpcObservableMap(): RpcObservableMap {
val onObservableRemove = RemovalListener<RPCApi.ObservableId, UnicastSubject<Notification<*>>> { val onObservableRemove = RemovalListener<RPCApi.ObservableId, UnicastSubject<Notification<*>>> {
val rpcCallSite = callSiteMap?.remove(it.key.toLong) val observableId = it.key!!
val rpcCallSite = callSiteMap?.remove(observableId.toLong)
if (it.cause == RemovalCause.COLLECTED) { if (it.cause == RemovalCause.COLLECTED) {
log.warn(listOf( log.warn(listOf(
"A hot observable returned from an RPC was never subscribed to.", "A hot observable returned from an RPC was never subscribed to.",
@ -126,7 +127,7 @@ class RPCClientProxyHandler(
"will appear less frequently in future versions of the platform and you can ignore it", "will appear less frequently in future versions of the platform and you can ignore it",
"if you want to.").joinToString(" "), rpcCallSite) "if you want to.").joinToString(" "), rpcCallSite)
} }
observablesToReap.locked { observables.add(it.key) } observablesToReap.locked { observables.add(observableId) }
} }
return CacheBuilder.newBuilder(). return CacheBuilder.newBuilder().
weakValues(). weakValues().

View File

@ -42,7 +42,7 @@ dependencies {
testCompile "org.assertj:assertj-core:${assertj_version}" testCompile "org.assertj:assertj-core:${assertj_version}"
// Guava: Google utilities library. // Guava: Google utilities library.
compile "com.google.guava:guava:$guava_version" testCompile "com.google.guava:guava:$guava_version"
// RxJava: observable streams of events. // RxJava: observable streams of events.
compile "io.reactivex:rxjava:$rxjava_version" compile "io.reactivex:rxjava:$rxjava_version"

View File

@ -15,6 +15,8 @@ dependencies {
// and CorDapps using :finance features should use 'cordapp' not 'compile' linkage. // and CorDapps using :finance features should use 'cordapp' not 'compile' linkage.
cordaCompile project(':core') cordaCompile project(':core')
compile "com.google.guava:guava:$guava_version"
testCompile project(':test-utils') testCompile project(':test-utils')
testCompile project(path: ':core', configuration: 'testArtifacts') testCompile project(path: ':core', configuration: 'testArtifacts')
testCompile "junit:junit:$junit_version" testCompile "junit:junit:$junit_version"
@ -39,4 +41,4 @@ jar {
publish { publish {
name jar.baseName name jar.baseName
} }