All posts tagged with 'Java8'

November recap and Java quickies

01-Dec-17

November has been a crazy month. Even though I joined Ralf in his Movember team and grew a mustache, I visited the JUG Münster at LVM Münster and gave my talk about SQL once again in a slightly updated version: It felt very good being part of innoQ on this occasion. Also very nice was […]

Read the complete article »

Wildly unused helper: EnumSet

22-Nov-17

Available since Java 1.5 is the nice helper class EnumSet and I still find code like this way to often: public class Foo { enum Thing { A, B, C }   public static final Set<Thing> THINGS = new HashSet<>(); static { THINGS.add(Thing.A); THINGS.add(Thing.B); THINGS.add(Thing.C); } }public class Foo { enum Thing { A, B, […]

Read the complete article »

What’s the fuss with Java 8 Optional?

15-Apr-15

I’ve been asked several times lately by colleagues what the Optional<T> is good for, so today some more basic stuff. You can use the Optional class is as an elaborate null check like Optional<String> optionalString = Optional.ofNullable(someString); if(optionalString.isPresent()) { String string = optionalString.get(); }   // Or worse // String string = optionalString.orElse(null); // null […]

Read the complete article »

JaCoCo, Maven and NetBeans 8 integration

22-May-14

I was looking for a nice solution to measure the code coverage in my Spring Boot biking project. It should support Java 8, Maven and for added bonus, my IDE. I ended up using JaCoCo respectively the Maven plugin. If you expect a lengthier post, i must disappoint you. All that was need to turn […]

Read the complete article »