Posts Tagged: jvm

Java 8 — Map and the Unknown “Niceties”

Posted by & filed under , .

Despite Java 9 making its way into the real world nowadays, I see a lot of Java code out there still relying on the old-style Java 6-like syntax. And I’m not talking about the usage of lambda’s, stream’s and the likes, but rather some of the improvements Java 8 brought to existing classes in the […]

Please Stop Using Thread.sleep() in Java!

Posted by & filed under , , .

Ok, I need a good moan about this to the extent that it deserves its own blog post, but I had it with the bloody Thread.sleep() method in Java! I know it was the only way to “sleep” back in the day but seriously, but seriously, we have TimeUnit since JDK 1.5 — and nowadays […]

Gradle — Customize Startup Scripts for Java Applications

Posted by & filed under , .

OK, so you use Gradle to build your Java projects. And if you use the application plugin in Gradle then you get also the startup script generation so you can ship that straight into your prod servers. Thing is, the application plugin generates a “standard” script — which does include the classpath and a whole […]

JaCoCo / Gradle — Excluding Source Files and Classes

Posted by & filed under , .

I have switched recently from Cobertura to JaCoCo so I started becoming more familiar with this tool. (And since you asked, one of the main reasons for the switch is that Cobertura is absolutely terrible when it comes to Java lambdas and pollutes the output with a lot of warning and messages about malformed Java […]

Automating Twitter OAuth Tasks with node.js

Posted by & filed under , .

At Netflix, we made a name for ourselves for being a Java shop. A quick look at our Netflix OSS page on Github reveals a whole suite of projects all Java-based. However, apart from the Java projects that are going on in Netflix – and the JVM-based projects (we DO Groovy and Scala too!) – […]

Convenience Factory Methods for Collections in Java 9

Posted by & filed under , .

Looking the other day through the JDK Enhancements Proposals (aka “JEP“) I came across JEP-269: “Convenience Factory Methods for Collections”. Oh hello, where have you been all these previous JDK releases? 🙂 It seems finally the Java world has woken up to what other JVM languages (and not only!) have been offering for a while: […]

@TupleConstructor in Groovy Language

Posted by & filed under , .

I find myself nowadays mixing a lot of JVM languages: I write a lot of “core” code in Java, as I prefer the verbosity of it somehow, but then I find myself a lot of times I just need a lot of utilities or “quickies” around this code — be it for unit testing purposes […]

Small Yet So Costly Java Mistake

Posted by & filed under , , .

OK so I felt like I needed to share this code with “the world” as I think it’s a good example of a few things: first of all nobody’s perfect — I know you read that in my website tag line 🙂 but yeah nobody’s perfect… sadly, in this instance, myself included 🙂 secondly, it […]

Gradle Multi-Project Issue with Checkstyle

Posted by & filed under , , .

I have encountered this with Gradle recently and I have struggled to find right away a solution to the issue — it took a bit of reading (more) about Gradle, Checkstyle and some digging in until I found the (rather simple) solution. So I thought I’d post it here for others to hopefully find this […]