Commit 83dff0a
fix(dispatcher): WW-3576 remove redundant volatile from SessionMap fields
The volatile keyword on non-primitive fields (HttpSession, Set) triggers
Sonar rule S3077 because volatile only guarantees reference visibility,
not thread-safety of object contents.
Since all field accesses are already protected by synchronized(this),
the volatile keyword is redundant - synchronization already provides
both visibility (happens-before) and atomicity guarantees.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 7f710ef commit 83dff0a
File tree
1 file changed
+2
-2
lines changed- core/src/main/java/org/apache/struts2/dispatcher
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
0 commit comments