gnodet commented on PR #704:
URL: https://github.com/apache/creadur-rat/pull/704#issuecomment-5089121887
Thank you for the thorough review @Claudenw!
I've addressed both points:
1. **RAT-268 restored** — reverted to original single-threaded form. Created
a dedicated `RAT-573` integration test that runs with `-T4` to exercise the
thread-safety fixes.
2. **Broader scope acknowledged** — I've updated the PR description to
document the remaining statics that would need attention for full thread-safety
(`SPDXMatcherFactory.INSTANCE`, `MatcherBuilderTracker`, `StandardCollection`'s
builders). These are more deeply embedded and would require more invasive
changes, so I've scoped this PR to the three most impactful fixes that resolve
the reported parallel build failures:
- `DefaultLog` → ThreadLocal
- `DeprecationReporter` → ThreadLocal
- `OptionCollection.parseCommands()` → synchronized
The `synchronized` on `parseCommands()` was the key fix — it prevents
concurrent `DefaultParser.parse()` calls from corrupting each other's
`OptionGroup.selected` state and `Converters.FILE_CONVERTER.workingDirectory`,
which was the root cause of exclusions being silently skipped under `-T4`.
Happy to update the RAT-573 Jira description if you'd like it reframed as
"make RAT safe for parallel builds" rather than just the DefaultLog issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]