Your search for Java returned 3 results.

Lombok Mutability Pitfalls and How To Avoid Them

Find out how Lombok can unwittingly undermine good mutability and encapsulation practices and what to do about it. Object-oriented encapsulation best practices lead development towards only relying on mutators to change object state. Any other way of changing it is called a side-effect and is generally very unwelcome. Side-effects have a nasty habit of introducing ...

Read More

Java Package-Info Annotation Generation with Gradle

Elegance and cleanliness in programming are important to me. Having a lot of package-info.java files scattered everywhere is an eyesore. However, that is exactly what I've prescribed in my earlier post about Java default nullability annotation set by a package. To define default package contracts throughout your project, you need to copy the same package-info file ...

Read More

How to Set Java Null Annotation By Package for Cleaner Code

What is a Java Null Annotation? Java nullability contracts are a way to mark the code in a way that static checkers know which parameters, variables or return types can be null. You would especially want to do that if you hate defensive null checks everywhere in the code, like this one: (more…)

Read More