X-Git-Url: https://git.pterodactylus.net/?p=Sone.git;a=blobdiff_plain;f=src%2Fmain%2Fkotlin%2Fnet%2Fpterodactylus%2Fsone%2Ffreenet%2Fwot%2FDefaultIdentity.kt;h=60979161d6f5681b6ac537bcde53cc3171fc45e5;hp=d50a4bab14050b308a7d8ec083237545f279f172;hb=438378deab1514f0f608d975ef65f5b7aea44ccb;hpb=29c49a60fc90dff37f981d813aa613606cbcd4dd diff --git a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/DefaultIdentity.kt b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/DefaultIdentity.kt index d50a4ba..6097916 100644 --- a/src/main/kotlin/net/pterodactylus/sone/freenet/wot/DefaultIdentity.kt +++ b/src/main/kotlin/net/pterodactylus/sone/freenet/wot/DefaultIdentity.kt @@ -1,5 +1,5 @@ /* - * Sone - DefaultIdentity.java - Copyright © 2010–2019 David Roden + * Sone - DefaultIdentity.kt - Copyright © 2010–2020 David Roden * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -22,7 +22,7 @@ import java.util.Collections.* /** * A Web of Trust identity. */ -open class DefaultIdentity(private val id: String, private val nickname: String, private val requestUri: String) : Identity { +open class DefaultIdentity(private val id: String, private val nickname: String?, private val requestUri: String) : Identity { private val contexts = mutableSetOf().synchronized() private val properties = mutableMapOf().synchronized() @@ -35,7 +35,7 @@ open class DefaultIdentity(private val id: String, private val nickname: String, override fun hasContext(context: String) = context in contexts - override fun setContexts(contexts: Collection) { + override fun setContexts(contexts: Set) { synchronized(this.contexts) { this.contexts.clear() this.contexts.addAll(contexts)