Core Java
-
Too Many Parameters in Java Methods, Part 3: Builder Pattern
In my two immediately previous posts, I looked at reducing the number of parameters required for a constructor or method…
Read More » -
Too Many Parameters in Java Methods, Part 2: Parameters Object
In my previous post, I looked at some of the problems associated with long parameters lists for methods and constructors.…
Read More » -
instanceof operator and Visitor pattern replacement in Java 8
I had a dream where instanceof operator and downcasting were no longer needed but without clumsiness and verbosity of visitor…
Read More » -
Java Auto-Unboxing Gotcha. Beware!
What do you think that the following code snippet will print? …
Read More » -
Too Many Parameters in Java Methods, Part 1: Custom Types
I consider lengthy parameters lists in constructors and methods to be another “red flag” in Java development that may not…
Read More » -
Stacks and Queues in Java
I have been working on some Java code recently that required both a stack and a queue. The choices to…
Read More » -
Unique hashCodes is not enough to avoid collisions
There is a common misconception that if you have unique hashCode() you won’t have collisions. While unique, or almost unique,…
Read More » -
Write an auto-debugger to catch Exceptions during test execution
Previously I have stated that there are some exceptions you would always want to keep an debugger breakpoint on for.…
Read More » -
Java Object to Object Mapper
I’ve been using Dozer some time on the project. But, recently I have got very interesting error which motivates me…
Read More »