Home » Tag Archives: Java 8 (page 8)

Tag Archives: Java 8

JUnit: testing exception with Java 8 and Lambda Expressions

java-logo

In JUnit there are many ways of testing exceptions in test code, including try-catch idiom, JUnit @Rule, with catch-exception library. As of Java 8 we have another way of dealing with exceptions: with lambda expressions. In this short blog post I will demonstrate a simple example how one can utilize the power of Java 8 and lambda expressions to test ...

Read More »

6 Reasons Not to Switch to Java 8 Just Yet

java-logo

Java 8 is awesome. Period. But… after we had the chance to have fun and play around with it, the time has come to quit avoiding the grain of salt. All good things come with a price and in this post I will share the main pain points of Java 8. Make sure you’re aware of these before upgrading and letting ...

Read More »

RxJava + Java8 + Java EE 7 + Arquillian = Bliss

arquillian-logo

Microservices are an architectural style where each service is implemented as an independent system. They can use their own persistence system (although it is not mandatory), deployment, language, … Because a system is composed by more than one service, each service will communicate with other services, typically using a lightweight protocol like HTTP and following a Restful Web approach. You ...

Read More »

Turning recursive file system traversal into Stream

java-logo

When I was learning programming, back in the days of Turbo Pascal, I managed to list files in directory usingFindFirst, FindNext and FindClose functions. First I came up with a procedure printing contents of a given directory. You can imagine how proud I was to discover I can actually call that procedure from itself to traverse file system recursively. Well, I didn’t know the ...

Read More »

Type safe dependency injection using Java 8.0

java-logo

So I sometimes really miss old school Dependency Injection. Back when Spring was still “lightweight” we happily configured all our beans in an application.xml file with the “learn-in-a-day” Spring bean xml configuration. The downsides to this were of course a loss of type safety. I can think of quite a few test cases whose sole purpose was to bootstrap the Spring ...

Read More »

Java 8 Friday: 10 Subtle Mistakes When Using the Streams API

java-logo

At Data Geekery, we love Java. And as we’re really into jOOQ’s fluent API and query DSL, we’re absolutely thrilled about what Java 8 will bring to our ecosystem. Java 8 Friday Every Friday, we’re showing you a couple of nice new tutorial-style Java 8 features, which take advantage of lambda expressions, extension methods, and other great stuff. You’ll find ...

Read More »

Builder pattern using Java 8

java-logo

I work in an environment where a great deal of our day to day scripting tasks occur through calling remote services as opposed to working with the database. For a lot of scripting tasks I’ve often used Groovy and one of the most useful features of Groovy specifically for that task has been it’s built in fluent Builders. Now Groovy ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.