From 27a0934b7e68315756020e0de0bc2564355be90a Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 23 Apr 2017 16:08:53 +0200 Subject: [PATCH] Formatting changes --- src/main/kotlin/net/pterodactylus/sone/core/DefaultElementLoader.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/kotlin/net/pterodactylus/sone/core/DefaultElementLoader.kt b/src/main/kotlin/net/pterodactylus/sone/core/DefaultElementLoader.kt index f553ae8..ebdae49 100644 --- a/src/main/kotlin/net/pterodactylus/sone/core/DefaultElementLoader.kt +++ b/src/main/kotlin/net/pterodactylus/sone/core/DefaultElementLoader.kt @@ -19,14 +19,14 @@ import javax.inject.Inject /** * [ElementLoader] implementation that uses a simple Guava [com.google.common.cache.Cache]. */ -class DefaultElementLoader(private val freenetInterface: FreenetInterface, ticker: Ticker) : ElementLoader { +class DefaultElementLoader(private val freenetInterface: FreenetInterface, ticker: Ticker): ElementLoader { - @Inject constructor(freenetInterface: FreenetInterface) : this(freenetInterface, Ticker.systemTicker()) + @Inject constructor(freenetInterface: FreenetInterface): this(freenetInterface, Ticker.systemTicker()) private val loadingLinks: Cache = CacheBuilder.newBuilder().build() private val failureCache: Cache = CacheBuilder.newBuilder().ticker(ticker).expireAfterWrite(30, MINUTES).build() private val elementCache: Cache = CacheBuilder.newBuilder().build() - private val callback = object : FreenetInterface.BackgroundFetchCallback { + private val callback = object: FreenetInterface.BackgroundFetchCallback { override fun shouldCancel(uri: FreenetURI, mimeType: String, size: Long): Boolean { return (size > 2097152) || (!mimeType.startsWith("image/") && !mimeType.startsWith("text/html")) } -- 2.7.4