From b853570be88e5cf3767e41412353395455aafe1f Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 30 Nov 2018 13:51:56 +0100 Subject: [PATCH] cleanup --- .../src/com/intellij/credentialStore/CredentialAttributes.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platform/platform-api/src/com/intellij/credentialStore/CredentialAttributes.kt b/platform/platform-api/src/com/intellij/credentialStore/CredentialAttributes.kt index e02b94246de4..f99ed9742ab8 100644 --- a/platform/platform-api/src/com/intellij/credentialStore/CredentialAttributes.kt +++ b/platform/platform-api/src/com/intellij/credentialStore/CredentialAttributes.kt @@ -11,14 +11,14 @@ import java.nio.charset.CodingErrorAction const val SERVICE_NAME_PREFIX = "IntelliJ Platform" -fun generateServiceName(subsystem: String, key: String): String = "$SERVICE_NAME_PREFIX $subsystem — $key" +fun generateServiceName(subsystem: String, key: String) = "$SERVICE_NAME_PREFIX $subsystem — $key" /** * requestor is deprecated. Never use it in new code. */ data class CredentialAttributes @JvmOverloads constructor(val serviceName: String, val userName: String? = null, val requestor: Class<*>? = null, val isPasswordMemoryOnly: Boolean = false) -fun CredentialAttributes.toPasswordStoreable(): CredentialAttributes = if (isPasswordMemoryOnly) CredentialAttributes(serviceName, userName, requestor) else this +fun CredentialAttributes.toPasswordStoreable() = if (isPasswordMemoryOnly) CredentialAttributes(serviceName, userName, requestor) else this // user cannot be empty, but password can be class Credentials(user: String?, val password: OneTimeString? = null) {