BIMserver
BIMserver copied to clipboard
Strange behaviour of get method in ClientIfcModel
Maybe I am missing something but ClientIfcModel.get(long oid) and ClientIfcModel.loadExplicit(long oid) have very strange behaviour.
Method "get" does the following:
IdEObject idEObject = super.get(oid); if (idEObject == null) { loadExplicit(oid); return super.get(oid); } return idEObject;
So if object is not found in BiMap cache it should be loaded explicitly
Then let's check "loadExplicit" method:
try { IdEObjectImpl idEObjectImpl = (IdEObjectImpl)super.get(oid); if (idEObjectImpl != null && !idEObjectImpl.isLoadedOrLoading() && !this.assumeCompletePreload) { .... }
It tries to get the same object from the same cache and if it is not found it won't load it explicitly and return null. So there will be null in return in anyway