Java

Bean Validation Anti-Patterns

Bean Validation is the de-facto standard for implementing validation logic in the Java ecosystem and it’s a great tool to have around.

Read more

Pollution-Free Dependency Management with Gradle

Remember the days when we had to manually download every single JAR file that our project needed to run? And not only the JAR files we directly depended upon, mind you, but even those JAR files that our dependencies and our dependencies' dependencies needed to work!

Read more

Maven Scopes and Gradle Configurations Explained

table th:first-of-type { width: 40%; } One of the key features of a build tool for Java is dependency management.

Read more

5 Reasons Why Business Exceptions Are a Bad Idea

I recently had a conversation about exception handling. I argued that business exceptions are a good thing because they clearly mark the possible failures of a business method.

Read more

3 Steps to Fix NoSuchMethodErrors and NoSuchMethodExceptions

A NoSuchMethodError occurs when we’re calling a method that does not exist at runtime. The method must have existed at compile time, since otherwise the compiler would have refused to compile the class calling that method with an error: cannot find symbol.

Read more

Definitive Guide to the JaCoCo Gradle Plugin

As discussed in my article about 100% Code Coverage*, a code coverage tool should provide the means not only to measure code coverage, but also to enforce it.

Read more