SpigotMC / BungeeCord

BungeeCord, the 6th in a generation of server portal suites. Efficiently proxies and maintains connections and transport between multiple Minecraft servers.
https://www.spigotmc.org/go/bungeecord
Other
1.57k stars 1.1k forks source link

Create shorter toString of components #3663

Open Janmm14 opened 5 months ago

Janmm14 commented 5 months ago

Done by:

Also use just one string builder and keep track of whether a comma is needed before the next property.

Extracted from #3625

md-5 commented 5 months ago

Why?

Janmm14 commented 5 months ago

Debugging purposes, and it doesn't hurt. I created it because previous impl (lombok) annoyed me during debugging legacy conversion improvement with all the xxx=null outputs.

md-5 commented 5 months ago

I'm not particularly keen on this. Lombok is there to eliminate this boilerplate

Janmm14 commented 5 months ago

Well then maybe not. Its not that important to be merged.

Sadly lombok has no way of excluding fields with null values.

Janmm14 commented 5 months ago

I've found a lombok ferature request to not print null values, but its just idling since 2021 https://github.com/projectlombok/lombok/issues/3038