Details
-
Bug
-
Resolution: Fixed
-
Major
-
5.3.1
-
None
-
None
Description
Found an example in the GUI where two different synchronized-blocks locked via what was presumed to be the same object. Inside one of the two blocks, the reference was assigned, so it wasn't the same object in the end, which resulted in those blocks not being synchronized anyway. That would have been caught if the object, that the blocks were locked via, had been declared as final. Ran a project-wide search for the warning "Synchronization on a non-final field", which resulted in 36 hits. These fields should be made final - at some of those 36 occurrences there might be an error hiding like the one I just fixed.
The one I fixed is everything that is done in this commit (except the "super. " that was accidentally inserted, haha) :
https://github.com/netarchivesuite/netarchivesuite/commit/65150512d561ee6ecc3eb2ea6906e49f0f0ea857
Since it's an even cleaner solution to synchronize on 'this' - that's the way I'm correcting these instead now.
Attachments
Issue Links
- spawned
-
NAS-2721 dk.netarkivet.harvester.indexserver.distribute.IndexRequestServerTester fails once in while
- Open