Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 82ab2488 authored by Yannick Li's avatar Yannick Li
Browse files

Convert put to assignment and fix typo

parent 376067ae
No related branches found
No related tags found
No related merge requests found
......@@ -79,7 +79,7 @@ class Collection {
val objectUId = CObjectUId<T>(this.id, objectId)
val newObject = PNCounter(this, objectUId as CObjectUId<PNCounter>, readOnly)
this.openedObjects.put(objectUId as CObjectUId<Any>, newObject as CObject<Any>)
this.openedObjects[objectUId as CObjectUId<Any>] = newObject as CObject<Any>
return newObject as T
}
......
......@@ -84,10 +84,10 @@ class Session {
fun openCollection(collectionUId: CollectionUId, readOnly: Boolean): Collection {
if (ActiveTransaction != null) throw RuntimeException("A collection cannot be open within a transaction.")
if (this.isClosed) throw RuntimeException("This session has been closed.")
if (this.openedCollections.isNotEmpty()) throw RuntimeException("A collection is alredy opened.")
if (this.openedCollections.isNotEmpty()) throw RuntimeException("A collection is already opened.")
val newCollection = Collection(this, collectionUId, readOnly)
this.openedCollections.put(collectionUId, newCollection)
this.openedCollections[collectionUId] = newCollection
return newCollection
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment