[Java] Fix undefined behavior in HumanObjectPeerTest
authorMatt Corallo <git@bluematt.me>
Thu, 28 Jul 2022 03:29:27 +0000 (03:29 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 28 Jul 2022 03:29:27 +0000 (03:29 +0000)
commita622cc2679ad08a6eacf1c5438f6fc370eb194eb
tree8c1ea35e0bc9dd971d5c40dc6d53b3b08d9a19d4
parentaf6f9949b19c1e8d2daac5c7a94cf14d41175f2b
[Java] Fix undefined behavior in HumanObjectPeerTest

CI somehow convinced the access to custom_messages_to_send to
trigger an `ArrayIndexOutOfBoundsException`, which should not be
possible except in race cases due to threading issues. Adding the
missing synchronized block should address it.
src/test/java/org/ldk/HumanObjectPeerTest.java