The 3.15.0.OH2 version we use already has a couple of additional commits compared to the official nrjavaserial 3.15.0 release. Most notably the arm64 support I added upstream.
I can build a 3.15.0.OH3 version so it also contains the additional PRs I made (the IllegalMonitorStateException fix and properly named threads which is also nice).
Because this is an openhab-core dependency the only way to get it integrated into 2.5.x would either be a new openhab-core 2.5.x release (which is frozen) or adding some overrides to openhab-distro 2.5.x which I think is also not preferable @Kai?
The easiest fix might be to catch the IllegalMonitorStateException. For OH3 we need a new version anyways because nrjavaserial crashes on Windows when using Java 11 (nrjavaserial#131, openhab-core#1384). I might help out with that if it hasn’t been resolved by the time users start testing OH3.