Minor style fixes.

This commit is contained in:
neviyn 2019-07-22 11:44:21 +01:00
parent 8779d82169
commit e70567d1a8
3 changed files with 5 additions and 6 deletions

View File

@ -24,7 +24,6 @@ class Email {
}
if (environment.getProperty("smtp.enabled")!!.toBoolean()) {
logger.debug("SMTP is enables")
logger.debug("Building CSV file content")
logger.debug("Setting up mailer environment")
val mailer = createMailer()
logger.debug("Constructing email")

View File

@ -55,7 +55,7 @@ object GroupSessionManager {
scenarioTitles?.forEach { title ->
output[title] = mutableListOf()
}
observations.forEach { k, v ->
observations.forEach { (k, v) ->
v.scenarios.forEach {
output[it.title]?.add(it.copy(title = k))
}

View File

@ -207,14 +207,14 @@ class GroupSessionController {
retryCount++
Thread.sleep(1_000) // Sleep for 1 second
}
if (ipv4 != null && this::environment.isInitialized)
return mapOf("ip" to ipv4, "port" to environment["local.server.port"]!!)
return if (ipv4 != null && this::environment.isInitialized)
mapOf("ip" to ipv4, "port" to environment["local.server.port"]!!)
else if (ipv4 == null) {
logger.error("IP Address could not be determined")
return mapOf("error" to "Could not determine IP Address")
mapOf("error" to "Could not determine IP Address")
} else {
logger.error("Port could not be determined, environment not initialised")
return mapOf("error" to "Could not determine port")
mapOf("error" to "Could not determine port")
}
}
}