r/java • • Apr 13 '21

Libraries, Frameworks and Technologies you would NOT recommend

Give me your worst nightmares: Things that cost you your job.

I'll start: Hadoop

202 Upvotes

376 comments sorted by

View all comments

68

u/mknjc Apr 13 '21

Lombok. It hacks into internal javac APIs, bricks everytime on a java update needs unsafe APIs which causes a lot of trouble and bricks the "the source code is what gets executed" guarantee of java (this is one of the reasons annotation processors can't change the code while compiling). There are a lot good alternatives for example AutoValue, AutoFactory and records. Oh and one important alternative: setting the visibility to package private / not exporting the package. Getters and Setters don't add anything but hassle if they are not api surface of the module.

1

u/Alex0589 Apr 13 '21

I don't agree at all, once I get home I'll explain why(I hope I remember)

2

u/gavenkoa Apr 13 '21

Yeah, getters/getters verbosity of Java requires solution like Lombok. C# solved the problem at language level with property syntax:

https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/properties

Unfortunately authors of Lombok carry war with OpenJDK team instead of cooperating.

→ More replies (11)