Vineflower / vineflower

Modern Java decompiler aiming to be as accurate as possible, with an emphasis on output quality. Fork of the Fernflower decompiler.
https://vineflower.org/
Apache License 2.0
1.13k stars 83 forks source link

Simplify empty anonymous class bodies to `{}` #381

Closed jpenilla closed 2 months ago

jpenilla commented 2 months ago

This is typically how people actually write code like this (as can be seen in the existing tests).

The improvement is extra noticeable with things like type tokens.

I can add an option for this if wanted. It would also not be hard to expand this to other types of classes, but that seemed less suitable, at least as a default behavior.