Excellent Explanation of PermGen Issues
If you develop web apps, you have encountered java.lang.OutOfMemoryError: PermGen. Nikita Salnikov-tarnovski wrote an excellent article where these come from and how to solve them: Busting PermGen...
View ArticleXtend for Java Developers
There are a couple of common pitfalls when a Java developer starts using Xtend. Java Xtend Description String.class typeof(String) Get the class instance of a type Long.MAX_VALUE Long::MAX_VALUE...
View ArticleEnums With More Than One Name
In Java, you sometimes encounter places where you need an enum with more than one name (or key). Here is the pattern that I use: import java.util.HashMap; import java.util.Map; enum X { // "A" is the...
View ArticleJava Toolbox
Holger Staudacher posted an article with some tools that you should know about when developing Java code: “A Software Craftsman’s Toolbox: Lightweight Java libraries that make life easier.“ Along the...
View ArticleThere is no Spoon: Changing Final Fields in Java
If you’re the guy in the team who solves the impossible problems, you will eventually run into the worst of all design patterns: Singletons. Which are implemented in Java using final (static) fields....
View ArticleJazoon 2013 – Rocket Propelled Java
“Rocket Propelled Java” is about being more productive by writing less boilerplate code (slides on slideshare). In his talk, Andres Almiray showed some tools to make your code more compact while...
View ArticleJazoon 2013 – Kafka and Storm – event processing in realtime
Guido Schmutz introduces two frameworks in his talk “Kafka and Storm – event processing in realtime” (slides on slideshare) Apache Kafka is a publish-subscribe messaging system like JMS but more...
View ArticleJazoon 2013 – Join the Java Evolution; JCP & Adopt-a-JSR
Heather VanCura explained how the new JCP works in her talk “Join the Java Evolution; JCP & Adopt-a-JSR“ Oracle spent the last years to make the JCP much more open and accessible. One example here...
View ArticleJazoon 2013 – The Economies of Scaling Software
If you’re small, scalability is not an issue. If you’re big, you can plan for it. But what if you wake up one morning and you suddenly find you’ve become the next Google? In his talk “The Economies of...
View ArticleBean of type is not eligible for getting processed by all BeanPostProcessors...
Haunted by this? Getting mysterious NullPointerExceptions in your BeanPostProcessors? I have written a lengthy answer how to debug and solve these issues on stackoverflow.com. Tagged:...
View ArticleOracle’s Java FAQ Displays in Chinese
I just looked at an article in the Oracle Java FAQ and I was a bit surprised to get this result: 如何設定例外網站清單? 本文適用於: Java 版本: 7.0 從 Java 7 Update 51 版本開始導入了例外網站清單功能。藉由將應用程式 URL...
View ArticleYouDebug, the Non-interactive Debugger
“Non-interactive” and “debugger” seem to be contradictory but bear with me. YouDebug is a tool which allows you to debug a running Java application with a script. How could this be useful? From the...
View ArticleStop on specific NullPointerException in Eclipse
TL;DR: Find the line where the exception occurs and then add a conditional breakpoint which checks the local variables for values that would trigger the exception. In Eclipse, you can stop on any...
View ArticleBinding one Instance to Two Interfaces in Guice
Sometimes, you need to bind one instance to two interfaces in Guice, for example: interface Foo { ... } interface Bar extends Foo { ... } class FooBarImpl implements Bar { ... } Let’s imaging...
View ArticleAvoid Publishing SNAPSHOTs to Nexus
Once in a while I’m running into people who deploy SNAPSHOT versions of Maven dependencies to a company-wide Nexus server with a job on a CI server. This is usually a very bad idea, especially when...
View Article