all: spotless

This commit is contained in:
Harsh Shandilya 2021-11-15 23:21:44 +05:30
parent 06ae72d771
commit 1040552dbf
No known key found for this signature in database
GPG key ID: 366D7BBAD1031E80
2 changed files with 8 additions and 9 deletions

View file

@ -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 {} }

View file

@ -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