Core Java
-
We’re Taking Bets: This Annotation Will Soon Show up in the JDK
This recent Stack Overflow question by Yahor has intrigued me: How to ensure at Java 8 compile time that a…
Read More » -
Is Getter DI A Good Idea?
Sometimes, you may hear about dependency injection done via a getter method, which subclasses override or mock frameworks fake for…
Read More » -
Transforming Collections
Did you ever want to substitute the equals and hashCode methods a HashSet or HashMap uses? Or have a List…
Read More » -
A Few Thoughts on Unit Test Scaffolding
When I start to repeat myself in unit test methods by creating the same objects and preparing the data to…
Read More » -
Puzzler: nested computeIfAbsent
Overview The Java 8 libraries have a new method on map, computeIfAbsent. This is very useful way to turn your…
Read More » -
Quasar and Akka – a Comparison
The actor model is a design pattern for fault-tolerant and highly scalable systems. Actors are independent worker-modules that communicate with…
Read More » -
What is Garbage Collection?
The following is an example from our Garbage Collection Handbook which will be published in the forthcoming weeks. In the meanwhile, take…
Read More » -
Constructors Must Be Code-Free
How much work should be done within a constructor? It seems reasonable to do some computations inside a constructor and…
Read More » -
How to Access a Method’s Result Value From the Finally Block
While the JVM is a stack-based machine, the Java language doesn’t really offer you any way to access that Stack.…
Read More »