projects
/
Sone.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
🔀 Merge branch 'release/v82'
[Sone.git]
/
src
/
main
/
kotlin
/
net
/
pterodactylus
/
sone
/
freenet
/
wot
/
DefaultIdentity.kt
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
fe84584
..
88527b3
100644
(file)
--- 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
*
* 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
@@
-17,7
+17,9
@@
package net.pterodactylus.sone.freenet.wot
package net.pterodactylus.sone.freenet.wot
-import java.util.Collections.*
+import java.util.Collections.synchronizedMap
+import java.util.Collections.synchronizedSet
+import kotlin.collections.set
/**
* A Web of Trust identity.
/**
* A Web of Trust identity.
@@
-77,6
+79,10
@@
open class DefaultIdentity(private val id: String, private val nickname: String?
}
}
}
}
+ override fun getTrust(): Map<OwnIdentity, Trust> = synchronized(trustCache) {
+ trustCache.toMap()
+ }
+
override fun getTrust(ownIdentity: OwnIdentity) = synchronized(trustCache) {
trustCache[ownIdentity]
}
override fun getTrust(ownIdentity: OwnIdentity) = synchronized(trustCache) {
trustCache[ownIdentity]
}