> > > You'll see that findbugs is unhappy about inconsistent synchronization > introduced when I made the finish method of BZip2CompressorOutputStream > synchronized due to COMPRESS-357 > > Yes, blockSorter is accessed unsynchronized in different places, but we > don't need to care as the class isn't thread safe anyway and all we > wanted to do is to avoid a race condition with GC. I'd prefer to > suppress the warning over synchronizing more of the class. > > Any feedback more than welcome. >
My feedback: I'd rather recommend to get rid of the finalize over adding synchronization. Using finalize is rarely a good idea. I wasn't aware we have that in the code base.