fix: FernFlower crash in decompile-all plugin due to wonky FF thread-local usage
@@ -93,7 +93,11 @@ public class FernFlowerAccessor implements IDecompiledData {
@Override
public String getClassContent(StructClass cl) {
- TextBuffer buffer = new TextBuffer(ClassesProcessor.AVERAGE_CLASS_SIZE);
+ TextBuffer buffer;
+ synchronized (this) {
+ // FernFlower does some wonky thread-local behavior.... just.... ugh, why?
+ buffer = new TextBuffer(ClassesProcessor.AVERAGE_CLASS_SIZE);
+ }
String name = cl.qualifiedName;
try {
Object banner = DecompilerContext.getProperty(IFernflowerPreferences.BANNER);
