I need to make a legacy Java monstrosity asynchronous and came across a class which is currently making me cry blood.

It took our whole team 5 days to figure out how this thing works, including the weekend. At one place, It is adding an empty list, to another list.

The magic here is that if I remove the statement assigning data to the sub list, the data is still somehow being populated in the root list.

This clusterfuck somehow works in single threaded processing, but as soon as I make this multi threaded, all hell breaks loose.

Please send help!!

  • 5
    Sounds mostly like an reference issue, as asynchronous and references bite each other.
Add Comment