Commit d5ff92cb authored by Sebastian Kaspari's avatar Sebastian Kaspari Committed by Christian Sadilek
Browse files

Update ktlint to 0.31.0.

parent 3681ee89
...@@ -232,7 +232,7 @@ configurations { ...@@ -232,7 +232,7 @@ configurations {
} }
dependencies { dependencies {
ktlint "com.github.shyiko:ktlint:0.29.0" ktlint "com.github.shyiko:ktlint:0.31.0"
} }
task ktlint(type: JavaExec, group: "verification") { task ktlint(type: JavaExec, group: "verification") {
......
...@@ -41,9 +41,11 @@ abstract class ReversibleString private constructor( ...@@ -41,9 +41,11 @@ abstract class ReversibleString private constructor(
ReverseString(string, offsetStart, offsetEnd) ReverseString(string, offsetStart, offsetEnd)
} }
private class ForwardString(string: String, offsetStart: Int, offsetEnd: Int) private class ForwardString(
: ReversibleString(string, offsetStart, offsetEnd string: String,
) { offsetStart: Int,
offsetEnd: Int
) : ReversibleString(string, offsetStart, offsetEnd) {
override val isReversed: Boolean = false override val isReversed: Boolean = false
override fun charAt(position: Int): Char { override fun charAt(position: Int): Char {
...@@ -58,9 +60,11 @@ abstract class ReversibleString private constructor( ...@@ -58,9 +60,11 @@ abstract class ReversibleString private constructor(
} }
} }
private class ReverseString(string: String, offsetStart: Int, offsetEnd: Int) private class ReverseString(
: ReversibleString(string, offsetStart, offsetEnd string: String,
) { offsetStart: Int,
offsetEnd: Int
) : ReversibleString(string, offsetStart, offsetEnd) {
override val isReversed: Boolean = true override val isReversed: Boolean = true
override fun charAt(position: Int): Char { override fun charAt(position: Int): Char {
......
...@@ -87,7 +87,7 @@ class ICOIconDecoderTest { ...@@ -87,7 +87,7 @@ class ICOIconDecoderTest {
entries entries
.sortedBy { entry -> entry.width } .sortedBy { entry -> entry.width }
. forEachIndexed { index, entry -> assertEquals(expectedEntries[index], entry) } .forEachIndexed { index, entry -> assertEquals(expectedEntries[index], entry) }
} }
@Test @Test
...@@ -114,7 +114,7 @@ class ICOIconDecoderTest { ...@@ -114,7 +114,7 @@ class ICOIconDecoderTest {
entries entries
.sortedByDescending { entry -> entry.width } .sortedByDescending { entry -> entry.width }
. forEachIndexed { index, entry -> assertEquals(expectedEntries[index], entry) } .forEachIndexed { index, entry -> assertEquals(expectedEntries[index], entry) }
} }
private fun loadIcon(fileName: String): ByteArray = private fun loadIcon(fileName: String): ByteArray =
......
...@@ -78,8 +78,7 @@ private val registry = ObserverRegistry<SyncStatusObserver>() ...@@ -78,8 +78,7 @@ private val registry = ObserverRegistry<SyncStatusObserver>()
* - periodic sync is requested to stop * - periodic sync is requested to stop
*/ */
@SuppressWarnings("TooManyFunctions") @SuppressWarnings("TooManyFunctions")
abstract class GeneralSyncManager abstract class GeneralSyncManager : SyncManager, Observable<SyncStatusObserver> by registry, SyncStatusObserver {
: SyncManager, Observable<SyncStatusObserver> by registry, SyncStatusObserver {
companion object { companion object {
// Periodically sync in the background, to make our syncs a little more incremental. // Periodically sync in the background, to make our syncs a little more incremental.
// This isn't strictly necessary, and could be considered an optimization. // This isn't strictly necessary, and could be considered an optimization.
......
...@@ -42,8 +42,10 @@ class FirefoxAccount internal constructor(private val inner: InternalFxAcct) : O ...@@ -42,8 +42,10 @@ class FirefoxAccount internal constructor(private val inner: InternalFxAcct) : O
* Note that it is not necessary to `close` the Config if this constructor is used (however * Note that it is not necessary to `close` the Config if this constructor is used (however
* doing so will not cause an error). * doing so will not cause an error).
*/ */
constructor(config: Config, persistCallback: PersistCallback? = null) constructor(
: this(InternalFxAcct(config, persistCallback)) config: Config,
persistCallback: PersistCallback? = null
) : this(InternalFxAcct(config, persistCallback))
override fun close() { override fun close() {
job.cancel() job.cancel()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment