Core Java
-
Pass Streams Instead of Lists
Opening disclaimer: this isn’t always a good idea. I’ll present the idea, along with some of the reasons why it’s…
Read More » -
Starting out with jHiccup
After writing my post on ‘How to detect and diagnose slow code in production’ I was encouraged by a reader…
Read More » -
Thou Shalt Not Name Thy Method “Equals”
(unless you really override Object.equals(), of course). I’ve stumbled upon a rather curious Stack Overflow question by user Frank: Why…
Read More » -
Using junit for something else
junit != unit test Junit is the Java unit testing framework. We use it for unit testing usually, but many…
Read More » -
Java 8 pitfall – Beware of Files.lines()
There’s a really nice new feature in Java8 which allows you to get a stream of Strings from a file…
Read More » -
Determining File Types in Java
Programmatically determining the type of a file can be surprisingly tricky and there have been many content-based file identification approaches…
Read More » -
Using JDK 8 Streams to Convert Between Collections of Wrapped Objects and Collections of Wrapper Objects
I have found Decorators and Adapters to be useful from time to time as I have worked with Java-based applications.…
Read More » -
The Optimum Method to Concatenate Strings in Java
Recently I was asked this question – Is it bad for performance to use the + operator to concatenate Strings in…
Read More » -
Why is my JVM having access to less memory than specified via -Xmx?
“Hey, can you drop by and take a look at something weird”. This is how I started to look into…
Read More »