Skip to content

Commit

Permalink
Apply updated lint rules
Browse files Browse the repository at this point in the history
  • Loading branch information
chrissearle committed May 16, 2024
1 parent 6b410fc commit 422b384
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/main/kotlin/com/itera/test/Extensions.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.itera.test

import java.util.*
import java.util.Optional

// Allows conversion of Optional<T> to T?
fun <T> Optional<T>.unwrap(): T? = orElse(null)
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ class DataKotlinController(val service: DataKotlinService) {
fun getAll() = service.getAll()

@RequestMapping("/{id}/")
fun getById(@PathVariable id: String) = service.getData(id.toLong())
fun getById(
@PathVariable id: String,
) = service.getData(id.toLong())
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import org.springframework.web.bind.annotation.RestController
@RestController
@RequestMapping("/kotlin")
class DummyKotlinController(val service: DummyKotlinService) {

@RequestMapping("/")
fun healthCheck() = if (service.backendCheck()) {
"OK"
} else {
"Not OK"
}
fun healthCheck() =
if (service.backendCheck()) {
"OK"
} else {
"Not OK"
}
}
1 change: 0 additions & 1 deletion src/main/kotlin/com/itera/test/domain/DataKotlin.kt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,5 @@ data class DataKotlin(
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
val id: Long,

val name: String,
)

0 comments on commit 422b384

Please sign in to comment.