Commit 4ecff15
fix(core): add synchronization to addLink to prevent race conditions
Add synchronized keyword to addLink method to ensure thread safety.
The method now performs compound operations (check -> add -> check -> rollback)
which could lead to race conditions without proper synchronization.
This aligns with the existing synchronized hasLink method.
Co-authored-by: hsluoyz <3787410+hsluoyz@users.noreply.github.com>1 parent 53da062 commit 4ecff15
File tree
1 file changed
+1
-1
lines changed- src/main/java/org/casbin/jcasbin/rbac
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
| |||
0 commit comments