ExportReviewNotes: Fix synchronization on non-final field
When all error prone warnings are enabled the SynchronizeOnNonFinalField
bug pattern is reported:
plugins/reviewnotes/src/main/java/com/googlesource/gerrit/plugins/reviewnotes/ExportReviewNotes.java:110:
error: [SynchronizeOnNonFinalField] Synchronizing on non-final fields is not safe:
if the field is ever updated, different threads may end up locking on different objects.
synchronized (changes) {
^
(see https://errorprone.info/bugpattern/SynchronizeOnNonFinalField)
Change-Id: Ie671af628f1ce60de53165048b80d88e2c4d26ae
1 file changed