RestComm / jain-slee

The World's #1 Open Source JAIN-SLEE (JSLEE) 1.1 Implementation
http://www.restcomm.com/
GNU Affero General Public License v3.0
24 stars 50 forks source link

Fix typo in SbbEntityFactoryImpl for removeSbbEntityWithCurrentClassLoader method #85

Closed SergeyLee closed 7 years ago

SergeyLee commented 7 years ago

Here: https://github.com/RestComm/jain-slee/blob/2.x/container/services/src/main/java/org/mobicents/slee/runtime/sbbentity/SbbEntityFactoryImpl.java#L273-L274 I guess comment and code are inconsistent

// if sbb entity is not root add a tx action to ensure lock is removed
if (sbbEntityID.isRootSbbEntity()) {

So here I want to understand what is right: comment or code?

jaimecasero commented 7 years ago

it seems lock is created when "createRootSBB" is called, so that suggets there is a lock per SBB-tree, being the root SBB the owner of the lock representing the whole tree.

Under that assumption, it only makes sense to remove the lock, when the root SBB is removed. In that case, the code is right, and the comment is wrong.

wdyt?

SergeyLee commented 7 years ago

@jaimecasero so my conclusion: comment is wrong and you were right the root SBB the owner of the lock representing the whole tree. I fixed this comment. Thanks for help.