mirror of
https://github.com/corda/corda.git
synced 2024-12-19 04:57:58 +00:00
Merge pull request #6065 from corda/chrisr3-no-location
NOTICK: Prevent learning the location of a Class inside sandbox.
This commit is contained in:
commit
80cf34b81a
@ -4,6 +4,7 @@ package net.corda.core.internal
|
|||||||
|
|
||||||
import net.corda.core.DeleteForDJVM
|
import net.corda.core.DeleteForDJVM
|
||||||
import net.corda.core.KeepForDJVM
|
import net.corda.core.KeepForDJVM
|
||||||
|
import net.corda.core.StubOutForDJVM
|
||||||
import net.corda.core.crypto.Crypto
|
import net.corda.core.crypto.Crypto
|
||||||
import net.corda.core.crypto.DigitalSignature
|
import net.corda.core.crypto.DigitalSignature
|
||||||
import net.corda.core.crypto.SecureHash
|
import net.corda.core.crypto.SecureHash
|
||||||
@ -417,6 +418,7 @@ fun <T, U : T> uncheckedCast(obj: T) = obj as U
|
|||||||
fun <K, V> Iterable<Pair<K, V>>.toMultiMap(): Map<K, List<V>> = this.groupBy({ it.first }) { it.second }
|
fun <K, V> Iterable<Pair<K, V>>.toMultiMap(): Map<K, List<V>> = this.groupBy({ it.first }) { it.second }
|
||||||
|
|
||||||
/** Returns the location of this class. */
|
/** Returns the location of this class. */
|
||||||
|
@get:StubOutForDJVM
|
||||||
val Class<*>.location: URL get() = protectionDomain.codeSource.location
|
val Class<*>.location: URL get() = protectionDomain.codeSource.location
|
||||||
|
|
||||||
/** Convenience method to get the package name of a class literal. */
|
/** Convenience method to get the package name of a class literal. */
|
||||||
|
Loading…
Reference in New Issue
Block a user