all: spotless
This commit is contained in:
parent
06ae72d771
commit
1040552dbf
2 changed files with 8 additions and 9 deletions
|
@ -33,9 +33,8 @@ internal class PublicSuffixList(
|
||||||
private val scope: CoroutineScope = CoroutineScope(dispatcher)
|
private val scope: CoroutineScope = CoroutineScope(dispatcher)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
private val data: PublicSuffixListData by lazy(LazyThreadSafetyMode.PUBLICATION) {
|
private val data: PublicSuffixListData by
|
||||||
PublicSuffixListLoader.load(context)
|
lazy(LazyThreadSafetyMode.PUBLICATION) { PublicSuffixListLoader.load(context) }
|
||||||
}
|
|
||||||
|
|
||||||
/** Prefetch the public suffix list from disk so that it is available in memory. */
|
/** Prefetch the public suffix list from disk so that it is available in memory. */
|
||||||
fun prefetchAsync(): Deferred<Unit> = scope.async { data.run {} }
|
fun prefetchAsync(): Deferred<Unit> = scope.async { data.run {} }
|
||||||
|
|
|
@ -17,13 +17,13 @@ class PGPKeyManagerTest {
|
||||||
|
|
||||||
@get:Rule val temporaryFolder: TemporaryFolder = TemporaryFolder()
|
@get:Rule val temporaryFolder: TemporaryFolder = TemporaryFolder()
|
||||||
private val filesDir by lazy(LazyThreadSafetyMode.NONE) { temporaryFolder.root }
|
private val filesDir by lazy(LazyThreadSafetyMode.NONE) { temporaryFolder.root }
|
||||||
private val keysDir by lazy(LazyThreadSafetyMode.NONE) {
|
private val keysDir by
|
||||||
File(filesDir, PGPKeyManager.KEY_DIR_NAME)
|
lazy(LazyThreadSafetyMode.NONE) { File(filesDir, PGPKeyManager.KEY_DIR_NAME) }
|
||||||
}
|
|
||||||
private val testCoroutineDispatcher = TestCoroutineDispatcher()
|
private val testCoroutineDispatcher = TestCoroutineDispatcher()
|
||||||
private val keyManager by lazy(LazyThreadSafetyMode.NONE) {
|
private val keyManager by
|
||||||
PGPKeyManager(filesDir.absolutePath, testCoroutineDispatcher)
|
lazy(LazyThreadSafetyMode.NONE) {
|
||||||
}
|
PGPKeyManager(filesDir.absolutePath, testCoroutineDispatcher)
|
||||||
|
}
|
||||||
private val key = PGPKeyManager.makeKey(TestUtils.getArmoredPrivateKey())
|
private val key = PGPKeyManager.makeKey(TestUtils.getArmoredPrivateKey())
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in a new issue