Core Java
-
Netty: Testing encoders/decoders
I’ve been working with Netty a bit recently and having built a pipeline of encoders/decoders as described in this excellent…
Read More » -
How LongAccumulator and DoubleAccumulator classes work?
Two classes new in Java 8 deserve some attention: LongAccumulator and DoubleAccumulator. They are designed to accumulate (more on what…
Read More » -
Exception Translation with ET
Some time ago I wrote a small blog post about exception translation with AspectJ. In this blog post we will…
Read More » -
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 »